summaryrefslogtreecommitdiffstats
path: root/src/privsep-root.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-06-10 16:32:04 +0100
committerRoy Marples <roy@marples.name>2020-06-10 16:32:04 +0100
commit536f64cabf24ea7ada1fa0c0fd5e59b5960391f3 (patch)
tree6bef017bb79b775507168251941886c69dd97eac /src/privsep-root.c
parentc15e4978b45b4d9fc6e3b7bbc28f28b6f06a9ea4 (diff)
downloaddhcpcd-536f64cabf24ea7ada1fa0c0fd5e59b5960391f3.tar.xz
privsep: Fix a shutdown race
Only test a successful stop IPC command. By the time we shutdown the socket to be extra nice, the process we sent stop to could have already exited, therefore we can discard any error.
Diffstat (limited to 'src/privsep-root.c')
-rw-r--r--src/privsep-root.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/privsep-root.c b/src/privsep-root.c
index efafc20a..46daeb07 100644
--- a/src/privsep-root.c
+++ b/src/privsep-root.c
@@ -480,7 +480,6 @@ ps_root_recvmsgcb(void *arg, struct ps_msghdr *psm, struct msghdr *msg)
shutdown(psp->psp_fd, SHUT_RDWR);
close(psp->psp_fd);
psp->psp_fd = -1;
- ps_dostop(ctx, &psp->psp_pid, &psp->psp_fd);
ps_freeprocess(psp);
}
return 0;