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: John Swensen
Subject: Re: Patch to Octave shutdown procedures
Date: Wed, 20 May 2009 07:20:14 -0400


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.

John Swensen


reply via email to

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