summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2019-09-25 12:56:05 -0400
committerOz Linden <oz@lindenlab.com>2019-09-25 12:56:05 -0400
commitbc8b55e1f2d772a657e4f7affc8a6c7d20f2c2e4 (patch)
tree6d757dde8f97d2c4811fc4791c87f4a609ef838c /indra
parent092bf4220eeaea0ae7765ea3cb49f122fb3e3dff (diff)
remove fatal error hook usage from LLLeap (potential races for multiple processes)
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llleap.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/indra/llcommon/llleap.cpp b/indra/llcommon/llleap.cpp
index 1c0678e453..8293c35516 100644
--- a/indra/llcommon/llleap.cpp
+++ b/indra/llcommon/llleap.cpp
@@ -59,7 +59,6 @@ public:
// pump name -- so it should NOT need tweaking for uniqueness.
mReplyPump(LLUUID::generateNewID().asString()),
mExpect(0),
- mPrevFatalHook(LLError::getFatalHook()),
// Instantiate a distinct LLLeapListener for this plugin. (Every
// plugin will want its own collection of managed listeners, etc.)
// Pass it a callback to our connect() method, so it can send events
@@ -67,7 +66,6 @@ public:
// this class or method name.
mListener(new LLLeapListener(boost::bind(&LLLeapImpl::connect, this, _1, _2)))
{
- LL_DEBUGS("FatalHook") << "previous fatal hook was " << (mPrevFatalHook ? "non-null" : "null") << LL_ENDL;
// Rule out unpopulated Params block
if (! cparams.executable.isProvided())
{
@@ -146,9 +144,6 @@ public:
mStderrConnection = childerr.getPump()
.listen("LLLeap", boost::bind(&LLLeapImpl::rstderr, this, _1));
- // For our lifespan, intercept any LL_ERRS so we can notify plugin
- LLError::setFatalHook(boost::bind(&LLLeapImpl::fatalHook, this, _1));
-
// Send child a preliminary event reporting our own reply-pump name --
// which would otherwise be pretty tricky to guess!
wstdin(mReplyPump.getName(),
@@ -163,8 +158,6 @@ public:
virtual ~LLLeapImpl()
{
LL_DEBUGS("LLLeap") << "destroying LLLeap(\"" << mDesc << "\")" << LL_ENDL;
- // Restore original FatalHook
- LLError::setFatalHook(mPrevFatalHook);
}
// Listener for failed launch attempt
@@ -378,31 +371,6 @@ public:
return false;
}
- LLError::ErrFatalHookResult fatalHook(const std::string& error)
- {
- // Notify plugin
- LLSD event;
- event["type"] = "error";
- event["error"] = error;
- mReplyPump.post(event);
-
- // All the above really accomplished was to buffer the serialized
- // event in our WritePipe. Have to pump mainloop a couple times to
- // really write it out there... but time out in case we can't write.
- LLProcess::WritePipe& childin(mChild->getWritePipe(LLProcess::STDIN));
- LLEventPump& mainloop(LLEventPumps::instance().obtain("mainloop"));
- LLSD nop;
- F64 until = (LLTimer::getElapsedSeconds() + 2).value();
- while (childin.size() && LLTimer::getElapsedSeconds() < until)
- {
- mainloop.post(nop);
- }
-
- // forward the call to the previous FatalHook, default to crashing if there isn't one
- LL_DEBUGS("FatalHook") << "end" << LL_ENDL;
- return mPrevFatalHook ? mPrevFatalHook(error) : LLError::ERR_CRASH;
- }
-
private:
/// We always want to listen on mReplyPump with wstdin(); under some
/// circumstances we'll also echo other LLEventPumps to the plugin.
@@ -423,7 +391,6 @@ private:
mStdinConnection, mStdoutConnection, mStdoutDataConnection, mStderrConnection;
boost::scoped_ptr<LLEventPump::Blocker> mBlocker;
LLProcess::ReadPipe::size_type mExpect;
- LLError::FatalHook mPrevFatalHook;
boost::scoped_ptr<LLLeapListener> mListener;
};