From 0d72198594b5f9f9620ba884bfd43f929f1455e0 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Fri, 19 Jan 2007 06:20:12 +0000 Subject: [PATCH] Get wrong pid when daemonizing --- src/os-unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os-unix.c b/src/os-unix.c index 5024af83..d36ba0af 100644 --- a/src/os-unix.c +++ b/src/os-unix.c @@ -95,9 +95,9 @@ int os_init(int foreground, char *runas) { DPRINTF(E_LOG,L_MAIN,"fdopen: %s\n",strerror(errno)); } /* just to be on the safe side... */ + _os_daemon_start(); fprintf(pid_fp,"%d\n",getpid()); fclose(pid_fp); - _os_daemon_start(); } // Drop privs here