Mercurial > octave
diff libinterp/corefcn/interpreter.cc @ 31039:ecb867dfc8eb stable
Don't shut down interpreter immediately on "execute" (bug #62308).
* libinterp/corefcn/interpreter.cc (interpreter::execute): Only shutdown
interpreter in cases where a main or server loop was started or in case an
exception was thrown.
(~interpreter): Shutdown the interpreter here if it wasn't shutdown in the
execute function.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 23 Apr 2022 15:20:18 +0200 |
parents | 076e19eac74a |
children | 0ee18536ec5c |
line wrap: on
line diff
--- a/libinterp/corefcn/interpreter.cc Fri May 27 07:55:01 2022 -0700 +++ b/libinterp/corefcn/interpreter.cc Sat Apr 23 15:20:18 2022 +0200 @@ -654,6 +654,9 @@ interpreter::~interpreter (void) { + if (! m_app_context) + shutdown (); + delete m_gh_manager; } @@ -906,15 +909,17 @@ } else exit_status = main_loop (); + + shutdown (); } } catch (const exit_exception& xe) { exit_status = xe.exit_status (); + + shutdown (); } - shutdown (); - return exit_status; }