From c0288e0612187ecbfc4a81d071fd504ea8737b7a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 24 Mar 2012 20:17:08 +0100 Subject: lib/util: Remove obsolete sys_getpid() and sys_fork(). The performance of these is minimal (these days) and they can return invalid results when used as part of applications that do not use sys_fork(). Autobuild-User: Jelmer Vernooij Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104 --- lib/util/become_daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/util/become_daemon.c') diff --git a/lib/util/become_daemon.c b/lib/util/become_daemon.c index 4c1d29e5a7..92a75862bd 100644 --- a/lib/util/become_daemon.c +++ b/lib/util/become_daemon.c @@ -75,7 +75,7 @@ _PUBLIC_ void close_low_fds(bool stdin_too, bool stdout_too, bool stderr_too) _PUBLIC_ void become_daemon(bool do_fork, bool no_process_group, bool log_stdout) { if (do_fork) { - if (sys_fork()) { + if (fork()) { _exit(0); } } -- cgit