diff options
| author | Roy Marples <roy@marples.name> | 2020-06-16 20:58:17 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-06-16 20:58:17 +0100 |
| commit | 9b3c9117fa48351e6b7e15176ace67163eccaecc (patch) | |
| tree | 54594ae90d09bf32937786f68ea2c40c6fdaaae7 /src/privsep-inet.c | |
| parent | 7fbcfeda938e4f566b791c45dcc942e922abe63e (diff) | |
| download | dhcpcd-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-inet.c')
| -rw-r--r-- | src/privsep-inet.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/privsep-inet.c b/src/privsep-inet.c index 44013a28..8bc0c2ea 100644 --- a/src/privsep-inet.c +++ b/src/privsep-inet.c @@ -296,18 +296,11 @@ ps_inet_signalcb(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; - } shutdown(ctx->ps_inet_fd, SHUT_RDWR); - eloop_exit(ctx->eloop, sig == SIGTERM ? EXIT_SUCCESS : EXIT_FAILURE); + eloop_exit(ctx->eloop, EXIT_SUCCESS); } ssize_t |
