diff options
| author | Roy Marples <roy@marples.name> | 2020-06-16 11:58:16 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-06-16 11:58:16 +0000 |
| commit | 84a8cab4e03c42b445fbcb33c3c03dd93e8803cc (patch) | |
| tree | 146d8dbc81f0365edb5b42a3c3c24689e4b28dfd /src/privsep-bpf.c | |
| parent | 51954c915aa6914486fc386cbe1e9aece02d368c (diff) | |
| download | dhcpcd-84a8cab4e03c42b445fbcb33c3c03dd93e8803cc.tar.xz | |
privsep: Don't handle any signals meant for the main process
Just incase someone issues a killall -HUP dhcpcd
Diffstat (limited to 'src/privsep-bpf.c')
| -rw-r--r-- | src/privsep-bpf.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/privsep-bpf.c b/src/privsep-bpf.c index 6189349d..69a38b4c 100644 --- a/src/privsep-bpf.c +++ b/src/privsep-bpf.c @@ -175,6 +175,16 @@ 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: + return; + } + eloop_exit(ctx->eloop, sig == SIGTERM ? EXIT_SUCCESS : EXIT_FAILURE); } |
