diff options
author | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-04-12 18:09:26 +0000 |
---|---|---|
committer | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-04-12 18:09:26 +0000 |
commit | 36abcfa57f39129886621df00e4f4bc3381b479f (patch) | |
tree | 6893f7992748817b64ec66947adc2ca40e13fb8e /miscutils/watchdog.c | |
parent | 00657c96b9b3963230d89ccc3dc2959d034673e7 (diff) | |
download | busybox-w32-36abcfa57f39129886621df00e4f4bc3381b479f.tar.gz busybox-w32-36abcfa57f39129886621df00e4f4bc3381b479f.tar.bz2 busybox-w32-36abcfa57f39129886621df00e4f4bc3381b479f.zip |
- patch from Denis Vlasenko to add and use bb_xdaemon()
git-svn-id: svn://busybox.net/trunk/busybox@14834 69ca8d6d-28ef-0310-b511-8ec308f3f277
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) | |||
40 | if (optind < argc - 1 || argc == 1) | 40 | if (optind < argc - 1 || argc == 1) |
41 | bb_show_usage(); | 41 | bb_show_usage(); |
42 | 42 | ||
43 | if (daemon(0, 1) < 0) | 43 | bb_xdaemon(0, 1); |
44 | bb_perror_msg_and_die("Failed forking watchdog daemon"); | ||
45 | 44 | ||
46 | signal(SIGHUP, watchdog_shutdown); | 45 | signal(SIGHUP, watchdog_shutdown); |
47 | signal(SIGINT, watchdog_shutdown); | 46 | signal(SIGINT, watchdog_shutdown); |