Fix a stall in running quit while a live process is running (#74687)

We need to generate events when finalizing, or we won't know that we
succeeded in stopping the process to detach/kill. Instead, we stall and
then after our 20 interrupt timeout, we kill the process (even if we
were supposed to detach) and exit.

OTOH, we have to not generate events when the Process is being
destructed because shared_from_this has already been torn down, and
using it will cause crashes.
This commit is contained in:
jimingham
2023-12-07 14:36:27 -08:00
committed by GitHub
parent 4a6ed4a90d
commit 9d3aec5535
14 changed files with 74 additions and 13 deletions

View File

@@ -140,7 +140,7 @@ ScriptedProcess::~ScriptedProcess() {
// make sure all of the broadcaster cleanup goes as planned. If we destruct
// this class, then Process::~Process() might have problems trying to fully
// destroy the broadcaster.
Finalize();
Finalize(true /* destructing */);
}
void ScriptedProcess::Initialize() {