diff options
author | callum <none@none> | 2009-12-14 14:10:16 -0800 |
---|---|---|
committer | callum <none@none> | 2009-12-14 14:10:16 -0800 |
commit | 180daf3ab83ff9a83200c1952c0f09d20cfcb992 (patch) | |
tree | 4591d743023244614678022269d80ef6d8097f63 /indra/llplugin/llpluginprocessparent.cpp | |
parent | 894a5006b3e5b4c725060443dab34491b0da3a4d (diff) | |
parent | 5b6e4577ae6073650d78e1181ca5b60c527a7ae7 (diff) |
Merge with Tip
Diffstat (limited to 'indra/llplugin/llpluginprocessparent.cpp')
-rw-r--r-- | indra/llplugin/llpluginprocessparent.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index 332ce288d7..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(); } @@ -99,12 +101,13 @@ void LLPluginProcessParent::errorState(void) setState(STATE_ERROR); } -void LLPluginProcessParent::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug) +void LLPluginProcessParent::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path) { mProcess.setExecutable(launcher_filename); mPluginFile = plugin_filename; mCPUUsage = 0.0f; mDebug = debug; + mUserDataPath = user_data_path; setState(STATE_INITIALIZED); } @@ -362,6 +365,7 @@ void LLPluginProcessParent::idle(void) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "load_plugin"); message.setValue("file", mPluginFile); + message.setValue("user_data_path", mUserDataPath); sendMessage(message); } @@ -412,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; |