Ticket #3811: 0001-Shutdown-Process-Applications-can-now-be-launched-in.patch

File 0001-Shutdown-Process-Applications-can-now-be-launched-in.patch, 1.6 KB (added by hrily, 6 years ago)

Patch

  • src/servers/registrar/ShutdownProcess.cpp

    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()  
    12751275            throw_error(B_SHUTDOWN_CANCELLED);
    12761276    }
    12771277
    1278     // tell TRoster not to accept new applications anymore
    1279     fRoster->SetShuttingDown(true);
    1280 
    12811278    fWorkerLock.Lock();
    12821279
    12831280    // get a list of all applications to shut down and sort them
    ShutdownProcess::_WorkerDoShutdown()  
    12861283    if (status  != B_OK) {
    12871284        fWorkerLock.Unlock();
    12881285        fRoster->RemoveWatcher(this);
    1289         fRoster->SetShuttingDown(false);
    12901286        return;
    12911287    }
    12921288
    ShutdownProcess::_WorkerDoShutdown()  
    13111307    _QuitApps(fUserApps, false);
    13121308    _WaitForDebuggedTeams();
    13131309
     1310    // tell TRoster not to accept new applications anymore
     1311    fRoster->SetShuttingDown(true);
     1312
    13141313    // phase 2: terminate the system apps
    13151314    _SetPhase(SYSTEM_APP_TERMINATION_PHASE);
    13161315    _QuitApps(fSystemApps, true);