octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quit() implementation


From: John Swensen
Subject: Re: quit() implementation
Date: Tue, 26 May 2009 08:39:14 -0400


On May 26, 2009, at 4:58 AM, Jaroslav Hajek wrote:


Yes. Another difference is that interrupt handlers are not installed.
And now there's one more: the initial status of quit_allowed. Maybe
rather than a single flag we could have an enum { NORMAL, IDE,
EMBEDDED }.


I personally would much prefer this method of allowing 3 modes to be sent to octave_main(). Also, did you say that the current "embedded" flag does not install the interrupt handlers? I think the "IDE mode" should still install interrupt handlers, but that they should use octave_exit() instead of ::exit().

As a side note, as I was trying to get all this to work for Octave 3.0.x (which has none of this new shutdown code), I think I found an alternate solution that doesn't require any changes to the current code. I found that if I add another function to the ::atexit() stack after everything in Octave has been initialized, then it will be the first function to be called when ::exit() is called. This means that I can clean up the IDE to my hearts content and not return until I am sure it is OK to proceed with the rest of the Octave shutdown which is initiated by a call to ::exit().

John Swensen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]