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.
parent
6245ae0bac
commit
5e4d7ec715
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue