*sigh* some linux implementations have the function daemon.

This commit is contained in:
lotodore
2007-08-28 10:43:34 +00:00
parent a51139ed65
commit 9cfed43fd0
2 changed files with 22 additions and 16 deletions
+5 -2
View File
@@ -58,7 +58,10 @@ TerminateHandler(int signal)
// TODO: Hack
#ifndef _WIN32
int daemon();
#include <unistd.h>
#ifndef daemon
int daemon(int, int);
#endif
#endif
int
@@ -70,7 +73,7 @@ main(int argc, char *argv[])
// TODO: Hack
#ifndef _WIN32
daemon();
daemon(0, 0);
#endif
signal(SIGTERM, TerminateHandler);