From: Roy Marples Date: Sun, 1 Dec 2019 21:54:48 +0000 (+0000) Subject: privsep: Dont exit the eloop on signal in the launcher process X-Git-Tag: v9.0.0~188 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd9509471a6ca24d5ddbed0ba33f95a243f82bfe;p=thirdparty%2Fdhcpcd.git privsep: Dont exit the eloop on signal in the launcher process The state engine will receive the signal and write back to the fork_fd socket. --- diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 125bf5f4..fefe3c94 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -1321,8 +1321,6 @@ dhcpcd_signal_cb(int sig, void *arg) logerr("%s: pid cannot be zero", __func__); else if (kill(pid, sig) == -1) logerr("%s: kill", __func__); - eloop_exit(ctx->eloop, - sig == SIGTERM ? EXIT_SUCCESS : EXIT_FAILURE); return; } @@ -2059,7 +2057,7 @@ printpidfile: #endif #ifdef PRIVSEP - if (ps_start(&ctx) == -1) { + if (ps_start(&ctx) == -1 && errno != 0) { logerr("ps_start"); goto exit_failure; }