On 03/31/2011 07:38 AM, Ben Abbott wrote:

> Dan, my understanding is that there is no mechanism by which Octave
> can determine if the gnuplot window has closed. Also there is no
> (existing) mechanism to tell gnuplot to exit when its plot window is
> closed.

Last night I looked at a few things.  I killed the gnuplot process and 
Octave goes into a bad state.  That in itself isn't very graceful, but 
not a critical issue for Octave in its current form.

I could try to make mods to gnuplot so that it can reflect that wxt, 
x11, aqua, etc. have a closed window action.  But how best to do so is 
the question.

My first thought was if an Octave function like ftell() would reflect 
the state of the gnuplot pipe, then having gnuplot exit upon a window 
close would do it.  But seeing as its not so simple and C-level changes 
would be need for that, then a better solution might be good.


> To further complicate things, gnuplot supports several guis
> (wxt, x11, aqua, windows, pm, etc). On some (MacOS using Aquaterm for
> example, and Windows I think) there is no mechanism for gnuplot to
> know if the plot window opened, or if it has been closed.

With so many terminals, it seems the best way is to make the open/close 
communication consistent and generic.  Probably through IPC.


> Do you have an idea for how these problems may be solved?

I imagine that there isn't really too much code to change or write to 
create such a feature.  But I'm open for advice on the best way to do 
it.  My guess is to simply follow the protocols that are intended by the 
operating system in the first place.  Some type of half-duplex 
communication with a semaphore perhaps?  Then what would get 
communicated back and forth?

An additional question is how Octave would handle things in a 
half-duplex strategy.

Dan

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to