Get wrong pid when daemonizing

This commit is contained in:
Ron Pedde 2007-01-19 06:20:12 +00:00
parent 5383d1c1ca
commit 0d72198594

View File

@ -95,9 +95,9 @@ int os_init(int foreground, char *runas) {
DPRINTF(E_LOG,L_MAIN,"fdopen: %s\n",strerror(errno)); DPRINTF(E_LOG,L_MAIN,"fdopen: %s\n",strerror(errno));
} }
/* just to be on the safe side... */ /* just to be on the safe side... */
_os_daemon_start();
fprintf(pid_fp,"%d\n",getpid()); fprintf(pid_fp,"%d\n",getpid());
fclose(pid_fp); fclose(pid_fp);
_os_daemon_start();
} }
// Drop privs here // Drop privs here