add windows daemon mode. Somthing is still not right here, the fopen is failing?

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@671 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-02-25 04:48:33 +00:00
parent 5cd80803f7
commit 5782ca928c
1 changed files with 5 additions and 1 deletions

View File

@ -51,10 +51,10 @@ int main(int argc, char *argv[])
}
if (bg) {
int pid;
#ifdef WIN32
char *path = ".\\freeswitch.log";
#else
int pid;
char *path = "/var/log/freeswitch.log";
nice(-20);
#endif
@ -66,10 +66,14 @@ int main(int argc, char *argv[])
(void) signal(SIGHUP, (void *) handle_SIGHUP);
#ifdef WIN32
FreeConsole();
#else
if ((pid = fork())) {
fprintf(stderr, "%d Backgrounding.\n", (int)pid);
exit(0);
}
#endif
}
if (switch_core_init(out) != SWITCH_STATUS_SUCCESS) {