In LLPluginProcessParent, instead of killing the plugin process, terminate it by closing the sockets. This lets it do some cleanup before exiting, instead of just getting shot.

master
Monroe Linden 2009-12-11 17:50:59 -08:00
parent 6245ae0bac
commit 5e4d7ec715
1 changed files with 6 additions and 3 deletions

View File

@ -79,8 +79,10 @@ LLPluginProcessParent::~LLPluginProcessParent()
// and remove it from our map
mSharedMemoryRegions.erase(iter);
}
mProcess.kill();
// orphaning the process means it won't be killed when the LLProcessLauncher is destructed.
// This is what we want -- it should exit cleanly once it notices the sockets have been closed.
mProcess.orphan();
killSockets();
}
@ -414,7 +416,8 @@ void LLPluginProcessParent::idle(void)
break;
case STATE_CLEANUP:
mProcess.kill();
// Don't do a kill here anymore -- closing the sockets is the new 'kill'.
mProcess.orphan();
killSockets();
setState(STATE_DONE);
break;