]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: Dont exit the eloop on signal in the launcher process
authorRoy Marples <roy@marples.name>
Sun, 1 Dec 2019 21:54:48 +0000 (21:54 +0000)
committerRoy Marples <roy@marples.name>
Sun, 1 Dec 2019 21:54:48 +0000 (21:54 +0000)
The state engine will receive the signal and write back to the
fork_fd socket.

src/dhcpcd.c

index 125bf5f4b593dfc9028e475388d2ca9361006d90..fefe3c94132ad2ffff181c15a2a77f5694f9c68b 100644 (file)
@@ -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;
        }