octave-maintainers
[Top][All Lists]
Advanced

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

Re: Patch to Octave shutdown procedures


From: Jaroslav Hajek
Subject: Re: Patch to Octave shutdown procedures
Date: Wed, 20 May 2009 13:27:21 +0200

On Wed, May 20, 2009 at 1:20 PM, John Swensen <address@hidden> wrote:
>
> On May 20, 2009, at 4:06 AM, Jaroslav Hajek wrote:
>
>>>
>>> I can do it. This issue affects other projects I'm interested in, too.
>>> There should really be a clean way to prevent quit() from terminating
>>> the whole process if Octave is embedded. It never occured to me before
>>> :)
>>>
>>
>> I committed the following patch:
>> http://hg.savannah.gnu.org/hgweb/octave/rev/ee7cf4d963f3
>>
>> summary:
>> quit() now raises an octave_quit_exception, carrying the exit status.
>> this is handled in main_loop and a couple of other functions.
>> octave_exit pointer is declared and points to ::exit at startup. it
>> may be overriden by user code or even NULL.
>>
>> also, main_loop et al. now perform unwind_protect_cleanup actions when
>> quit() is called. It seems reasonable to do so - anyone disagrees?
>>
>> cheers
>>
>
> This solves half my problem.  I thought you were going to make a function
> pointer to allow a developer to replace clean_up_and_exit, reathre than just
> exit().  I still have the problem that I can't control when
> do_octave_at_exit gets called.  This was the other function that I needed to
> delay.

I think clean_up_and_exit should always do at least the cleanup. If
you don't want octave_main to call it at the end, you should call with
embedded = true, then you have full control. That's what it was made
for, actually.


-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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