From 78bade9df9a490cf8f8b6ba09dd493019e88c17f Mon Sep 17 00:00:00 2001
From: Hrishi Hiraskar <hrishihiraskar@gmail.com>
Date: Mon, 15 Jan 2018 18:47:00 +0530
Subject: [PATCH] Shutdown Process : Applications can now be launched in
USER_APP_TERMINATION_PHASE
User can now launch applications in USER_APP_TERMINATION_PHASE (like
when there is a dialog to save an open document). Fixes #3811 : System
enters "shutdown mode" too early.
---
src/servers/registrar/ShutdownProcess.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/servers/registrar/ShutdownProcess.cpp b/src/servers/registrar/ShutdownProcess.cpp
index c6ae176303..e8009e3edd 100644
a
|
b
|
ShutdownProcess::_WorkerDoShutdown()
|
1275 | 1275 | throw_error(B_SHUTDOWN_CANCELLED); |
1276 | 1276 | } |
1277 | 1277 | |
1278 | | // tell TRoster not to accept new applications anymore |
1279 | | fRoster->SetShuttingDown(true); |
1280 | | |
1281 | 1278 | fWorkerLock.Lock(); |
1282 | 1279 | |
1283 | 1280 | // get a list of all applications to shut down and sort them |
… |
… |
ShutdownProcess::_WorkerDoShutdown()
|
1286 | 1283 | if (status != B_OK) { |
1287 | 1284 | fWorkerLock.Unlock(); |
1288 | 1285 | fRoster->RemoveWatcher(this); |
1289 | | fRoster->SetShuttingDown(false); |
1290 | 1286 | return; |
1291 | 1287 | } |
1292 | 1288 | |
… |
… |
ShutdownProcess::_WorkerDoShutdown()
|
1311 | 1307 | _QuitApps(fUserApps, false); |
1312 | 1308 | _WaitForDebuggedTeams(); |
1313 | 1309 | |
| 1310 | // tell TRoster not to accept new applications anymore |
| 1311 | fRoster->SetShuttingDown(true); |
| 1312 | |
1314 | 1313 | // phase 2: terminate the system apps |
1315 | 1314 | _SetPhase(SYSTEM_APP_TERMINATION_PHASE); |
1316 | 1315 | _QuitApps(fSystemApps, true); |