supervise-daemon: do not spawn a process if we are exiting
This fixes #375 and allows us to not add another level of indentation in the supervisor loop.
This commit is contained in:
parent
57d9528a0b
commit
da30767353
@ -648,6 +648,8 @@ static void supervisor(char *exec, char **argv)
|
||||
ts.tv_sec = respawn_delay;
|
||||
ts.tv_nsec = 0;
|
||||
nanosleep(&ts, NULL);
|
||||
if (exiting)
|
||||
continue;
|
||||
child_pid = fork();
|
||||
if (child_pid == -1) {
|
||||
syslog(LOG_ERR, "%s: fork: %s", applet, strerror(errno));
|
||||
|
Loading…
Reference in New Issue
Block a user