# HG changeset patch # User Markus Mützel # Date 1650720018 -7200 # Node ID ecb867dfc8eb96ef0917884e959b397ca7f81aff # Parent 39876ea8c588215218fe0e076d62829841fd83db 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. diff -r 39876ea8c588 -r ecb867dfc8eb libinterp/corefcn/interpreter.cc --- 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; }