diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-02-05 15:08:08 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-02-05 15:08:08 +0100 |
commit | bbf1e3c144c1ee93409a0e0546cb56b34eccfcfd (patch) | |
tree | d5c43b16af0dd7878db49ab416ab7a0f56113d32 | |
parent | 6e9d047c1558f92531ea12b9e3206023ab77cf51 (diff) | |
download | busybox-w32-bbf1e3c144c1ee93409a0e0546cb56b34eccfcfd.tar.gz busybox-w32-bbf1e3c144c1ee93409a0e0546cb56b34eccfcfd.tar.bz2 busybox-w32-bbf1e3c144c1ee93409a0e0546cb56b34eccfcfd.zip |
acpid: do not install handlers for fatal signals
For acpid, it's ok to die at once.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | util-linux/acpid.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/util-linux/acpid.c b/util-linux/acpid.c index 361a2b206..1b22f3a01 100644 --- a/util-linux/acpid.c +++ b/util-linux/acpid.c | |||
@@ -268,8 +268,12 @@ int acpid_main(int argc UNUSED_PARAM, char **argv) | |||
268 | 268 | ||
269 | xchdir(opt_dir); | 269 | xchdir(opt_dir); |
270 | 270 | ||
271 | /* We spawn children but don't wait for them. Prevent zombies: */ | ||
271 | bb_signals((1 << SIGCHLD), SIG_IGN); | 272 | bb_signals((1 << SIGCHLD), SIG_IGN); |
272 | bb_signals(BB_FATAL_SIGS, record_signo); | 273 | // If you enable this, (1) explain why, (2) |
274 | // make sure while(poll) loop below is still interruptible | ||
275 | // by SIGTERM et al: | ||
276 | //bb_signals(BB_FATAL_SIGS, record_signo); | ||
273 | 277 | ||
274 | pfd = NULL; | 278 | pfd = NULL; |
275 | nfd = 0; | 279 | nfd = 0; |
@@ -337,7 +341,7 @@ int acpid_main(int argc UNUSED_PARAM, char **argv) | |||
337 | } | 341 | } |
338 | if (!event) | 342 | if (!event) |
339 | continue; | 343 | continue; |
340 | // spawn event handler | 344 | /* spawn event handler */ |
341 | process_event(event); | 345 | process_event(event); |
342 | } | 346 | } |
343 | } | 347 | } |