summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorMike <contact@mikelittman.me>2026-10-14 00:04:11 -0500
committerGitHub <noreply@github.com>2026-10-14 13:04:11 +0800
commit4d3ec2142c2fcafec17425284a59134f62c3f8b7 (patch)
tree1a167e4b946da44f1ed3888850898b48a0db45fc /indra/newview/llappviewer.cpp
parent9cc783022a202a1d00b5dc8eaf01ffddbc9fa39f (diff)
Log out before exiting on the first terminate signal (#35)
SIGTERM was marking the app quitting immediately, so the Mac frame pump stopped before LogoutRequest and the simulator kept the agent in the region. The first signal now runs the normal logout. A second signal still forces the process to exit.
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index d48ccdb9ea..f8c687b0fc 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1360,6 +1360,14 @@ bool LLAppViewer::frame()
bool LLAppViewer::doFrame()
{
+ // SIGTERM asks for a normal logout. Quitting immediately skips
+ // LogoutRequest and leaves the agent in the region.
+ if (LLApp::consumeSignalQuit() && !mQuitRequested && !isQuitting())
+ {
+ LL_INFOS() << "Terminate signal, logging out before exit" << LL_ENDL;
+ requestQuit();
+ }
+
resumeMainloopTimeout("Main:doFrameStart");
U32 fpsLimitMaxFps = (U32)gSavedSettings.getU32("MaxFPS");