mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 00:22:35 +00:00
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:
parent
5cd80803f7
commit
5782ca928c
@ -51,10 +51,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (bg) {
|
if (bg) {
|
||||||
int pid;
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
char *path = ".\\freeswitch.log";
|
char *path = ".\\freeswitch.log";
|
||||||
#else
|
#else
|
||||||
|
int pid;
|
||||||
char *path = "/var/log/freeswitch.log";
|
char *path = "/var/log/freeswitch.log";
|
||||||
nice(-20);
|
nice(-20);
|
||||||
#endif
|
#endif
|
||||||
@ -66,10 +66,14 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
(void) signal(SIGHUP, (void *) handle_SIGHUP);
|
(void) signal(SIGHUP, (void *) handle_SIGHUP);
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
FreeConsole();
|
||||||
|
#else
|
||||||
if ((pid = fork())) {
|
if ((pid = fork())) {
|
||||||
fprintf(stderr, "%d Backgrounding.\n", (int)pid);
|
fprintf(stderr, "%d Backgrounding.\n", (int)pid);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_core_init(out) != SWITCH_STATUS_SUCCESS) {
|
if (switch_core_init(out) != SWITCH_STATUS_SUCCESS) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user