summaryrefslogtreecommitdiffstats
path: root/src/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-11-29 13:55:46 +0000
committerRoy Marples <roy@marples.name>2019-11-29 13:55:46 +0000
commitc920247719ccbe2a0297a5467f04f459eb052398 (patch)
tree54368294ead2aa4b2f9eef4ca84a22a9fa767307 /src/dhcpcd.c
parente91451a20d134ff9e3b22cc398341b94e5e2904b (diff)
downloaddhcpcd-c920247719ccbe2a0297a5467f04f459eb052398.tar.xz
privsep: Use another eloop instead of a blocking read.
We need to read the error status from making a privileged request. This happens in an eloop already, but the read itself needs to block. So that we can still be interupted, use an inner eloop whose sole purpose is to monitor the root fd for message back. Then we can make the fd non blocking. dhcpcd should now exit cleanly once more.
Diffstat (limited to 'src/dhcpcd.c')
-rw-r--r--src/dhcpcd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c
index 43efeecc..8550de73 100644
--- a/src/dhcpcd.c
+++ b/src/dhcpcd.c
@@ -2198,6 +2198,9 @@ exit1:
ipv6_ctxfree(&ctx);
#endif
dev_stop(&ctx);
+#ifdef PRIVSEP
+ eloop_free(ctx.ps_eloop);
+#endif
eloop_free(ctx.eloop);
if (ctx.options & DHCPCD_STARTED && !(ctx.options & DHCPCD_FORKED))