diff options
Diffstat (limited to 'miscutils/watchdog.c')
-rw-r--r-- | miscutils/watchdog.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index e040c64fd..28bd35813 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c | |||
@@ -47,8 +47,10 @@ int watchdog_main(int argc, char **argv) | |||
47 | bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv); | 47 | bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv); |
48 | } | 48 | } |
49 | 49 | ||
50 | signal(SIGHUP, watchdog_shutdown); | 50 | bb_signals(0 |
51 | signal(SIGINT, watchdog_shutdown); | 51 | + (1 << SIGHUP) |
52 | + (1 << SIGINT) | ||
53 | , watchdog_shutdown); | ||
52 | 54 | ||
53 | /* Use known fd # - avoid needing global 'int fd' */ | 55 | /* Use known fd # - avoid needing global 'int fd' */ |
54 | xmove_fd(xopen(argv[argc - 1], O_WRONLY), 3); | 56 | xmove_fd(xopen(argv[argc - 1], O_WRONLY), 3); |