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

Commit e889a474 authored by Mike Kasick's avatar Mike Kasick Committed by Ricardo Cerqueira
Browse files

Restart oneshot services when manually restarted.

Restores manual restart behavior of oneshot services prior to I9935b519.

Change-Id: Iadfc8462838e3ad2dbbe38d76ba2ef0ce955f722
parent b433d3c6
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ static int wait_for_one_process(int block)

    NOTICE("process '%s', pid %d exited\n", svc->name, pid);

    if (!(svc->flags & SVC_ONESHOT)) {
    if (!(svc->flags & SVC_ONESHOT) || (svc->flags & SVC_RESTART)) {
        kill(-pid, SIGKILL);
        NOTICE("process '%s' killing any children in process group\n", svc->name);
    }
@@ -78,8 +78,9 @@ static int wait_for_one_process(int block)
    svc->pid = 0;
    svc->flags &= (~SVC_RUNNING);

        /* oneshot processes go into the disabled state on exit */
    if (svc->flags & SVC_ONESHOT) {
        /* oneshot processes go into the disabled state on exit,
         * except when manually restarted. */
    if ((svc->flags & SVC_ONESHOT) && !(svc->flags & SVC_RESTART)) {
        svc->flags |= SVC_DISABLED;
    }