|
From: | John Swensen |
Subject: | Re: Patch to Octave shutdown procedures |
Date: | Tue, 19 May 2009 15:36:44 -0400 |
On May 19, 2009, at 3:21 PM, Jaroslav Hajek wrote:
But why don't you call octave_main with embedded = true and just call main_loop afterwards? octave_main (argc, argv, true); // possibly call install_signal_handlers () and adjust the handlers main_loop (); // cleanup do_octave_atexit (); sysdep_cleanup (); what's the problem with this scheme?
I think there are 2 problem with this approach:1) That still doesn't solve the problem of the Octave quit function and the signal handlers calling exit(). I suppose I could replace all the Octave signal handlers with my own, but that seems like just asking for trouble and would still have the problem with the Octave quit function. 2) How do you force octave_parse () to return something other than zero to make it exit the main_loop function? I tried looking through parse.cc, but can't understand exactly what is going on in the octave_parse function (#defined as the yyparse function) and what exact condition will cause it to return a non-zero value.
John Swensen
[Prev in Thread] | Current Thread | [Next in Thread] |