From 5e4d7ec715f496406644d52701cbabc2935fc1c3 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 11 Dec 2009 17:50:59 -0800 Subject: 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. --- indra/llplugin/llpluginprocessparent.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index f60838b1e7..dab6d645dd 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -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; -- cgit v1.2.3