summaryrefslogtreecommitdiffstats
path: root/src/privsep-bpf.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-06-16 20:58:17 +0100
committerRoy Marples <roy@marples.name>2020-06-16 20:58:17 +0100
commit9b3c9117fa48351e6b7e15176ace67163eccaecc (patch)
tree54594ae90d09bf32937786f68ea2c40c6fdaaae7 /src/privsep-bpf.c
parent7fbcfeda938e4f566b791c45dcc942e922abe63e (diff)
downloaddhcpcd-9b3c9117fa48351e6b7e15176ace67163eccaecc.tar.xz
privsep: Simplyfy signal handling
All privsep processes only need to act on SIGTERM. The privileged actioneer also needs to act on SIGCHLD.
Diffstat (limited to 'src/privsep-bpf.c')
-rw-r--r--src/privsep-bpf.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/privsep-bpf.c b/src/privsep-bpf.c
index 69a38b4c..6892bf2a 100644
--- a/src/privsep-bpf.c
+++ b/src/privsep-bpf.c
@@ -175,17 +175,10 @@ ps_bpf_signal_bpfcb(int sig, void *arg)
{
struct dhcpcd_ctx *ctx = arg;
- /* Ignore dhcpcd signals */
- switch (sig) {
- case SIGINT:
- case SIGALRM:
- case SIGHUP:
- case SIGUSR1:
- case SIGUSR2:
+ if (sig != SIGTERM)
return;
- }
- eloop_exit(ctx->eloop, sig == SIGTERM ? EXIT_SUCCESS : EXIT_FAILURE);
+ eloop_exit(ctx->eloop, EXIT_SUCCESS);
}
ssize_t