From 2c99851181a652358aa3ca58ef38c57e46ae02e4 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 12 Apr 2006 18:09:26 +0000 Subject: - patch from Denis Vlasenko to add and use bb_xdaemon() --- debianutils/start_stop_daemon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'debianutils') diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index 5b689740e..b44a23b4b 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c @@ -275,8 +275,7 @@ start_stop_daemon_main(int argc, char **argv) } *--argv = startas; if (opt & SSD_OPT_BACKGROUND) { - if (daemon(0, 0) == -1) - bb_perror_msg_and_die ("unable to fork"); + bb_xdaemon(0, 0); setsid(); } if (opt & SSD_OPT_MAKEPID) { -- cgit v1.2.3