launch_daemon: don't relaunch when a shutdown is in progress
Change-Id: Ice0dd504f65f592eb64ec0e2192ef42b88486daa Reviewed-on: https://review.haiku-os.org/c/haiku/+/2043 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
feeb4b5d93
commit
0749734769
@@ -527,9 +527,15 @@ LaunchDaemon::MessageReceived(BMessage* message)
|
|||||||
job->TeamDeleted();
|
job->TeamDeleted();
|
||||||
|
|
||||||
if (job->IsService()) {
|
if (job->IsService()) {
|
||||||
// TODO: take restart throttle into account
|
bool inProgress = false;
|
||||||
// TODO: don't restart on shutdown
|
BRoster roster;
|
||||||
_LaunchJob(job);
|
BRoster::Private rosterPrivate(roster);
|
||||||
|
status_t status = rosterPrivate.IsShutDownInProgress(
|
||||||
|
&inProgress);
|
||||||
|
if (status != B_OK || !inProgress) {
|
||||||
|
// TODO: take restart throttle into account
|
||||||
|
_LaunchJob(job);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user