diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-04-12 22:09:26 +0400 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-04-12 22:09:26 +0400 |
commit | 2c99851181a652358aa3ca58ef38c57e46ae02e4 (patch) | |
tree | 6893f7992748817b64ec66947adc2ca40e13fb8e /miscutils/watchdog.c | |
parent | dac7ff15b7d32deeeef3d9665744fc5774c21d70 (diff) |
- patch from Denis Vlasenko to add and use bb_xdaemon()
Diffstat (limited to 'miscutils/watchdog.c')
-rw-r--r-- | miscutils/watchdog.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index 55dd69857..58a606553 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c @@ -40,8 +40,7 @@ int watchdog_main(int argc, char **argv) if (optind < argc - 1 || argc == 1) bb_show_usage(); - if (daemon(0, 1) < 0) - bb_perror_msg_and_die("Failed forking watchdog daemon"); + bb_xdaemon(0, 1); signal(SIGHUP, watchdog_shutdown); signal(SIGINT, watchdog_shutdown); |