[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jul 11 08:45:52 2003 
Subject:Re: poplog interactive mode 
From:Roger . Evans 
Volume-ID:1030711.01 

David,

poplog decides based on whether its standard input is a terminal. I 
can't recall if there's a simple way to force it not to (ideally there 
should be a command line flag). The big difference you are seeing is 
because when its not a terminal, it assigns 'sysexit' to 'interrupt', 
wherease what you want is the interactive default which is assigning 
'setpop' to 'interrupt'. You can achieve this from the command line like 
this, I think:

     pop11 +startup ":setpop -> interrupt; setpop();"

might be good to add a call to 'sysinitcomp' too - that loads init.p 
files etc, thus:

    pop11 +startup ":setop -> interrupt; sysinitcomp(); setpop();"

Note that you may see other funnies due to the fact that pop isn't 
talking to a real terminal (but presumably a pipe or something?) eg the 
controlling tty might not be set correctly, which means that ctrl C 
doesn't get handled right. Getting that right is a bit messy, but its 
something some very old libraries (imcsh?) had to mess with, so if you 
have them on your system they may give some clues - they were doing the 
reverse task of running a shell process via a VED window, but the 
controlling tty stuff is probably the same... (this is all unix-speak by 
the way, dunno what the equivalent problems might be under windows).

NB: if you find the amount of startup stuff you need to include is 
getting unweildy, put it into a saved image so that you invoke the whole 
thing simply as 'pop11 +inferior' or something...

Roger

david moss wrote:

> Hi,
>
> Does anyone know how poplog determines whether its running in 
> interactive mode?
>
> I ask because I'm working on a java wrapper for the interpreter that 
> will hopefully will be turned into a JEdit (www.jedit.org) plugin at 
> some stage. I am able to get a bash shell into a JTextArea, and from 
> there invoke pop11, but the interpreter exits on mishaps instead of 
> just pointing them out as it does in ved... If anyone has any idea of 
> what I'm talking about could you please help?
>
> david.
>