Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b065492 authored by Tao Wu's avatar Tao Wu Committed by android-build-merger
Browse files

Merge "Fix race condition between restart and stop/reset." am: ee14225e

am: 5c5a6bdc

Change-Id: Id9c1bb0ecd1b7b02c60fd2f0ce6ab67ea8f7096d
parents 8b210106 5c5a6bdc
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -960,6 +960,13 @@ void Service::StopOrReset(int how) {
    } else {
        flags_ |= how;
    }
    // Make sure it's in right status when a restart immediately follow a
    // stop/reset or vice versa.
    if (how == SVC_RESTART) {
        flags_ &= (~(SVC_DISABLED | SVC_RESET));
    } else {
        flags_ &= (~SVC_RESTART);
    }

    if (pid_) {
        KillProcessGroup(SIGKILL);