git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1264 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-04-26 19:11:49 +00:00
parent b81e4d6c97
commit 76b63d3a38
3 changed files with 22 additions and 23 deletions

View File

@@ -107,6 +107,19 @@ int main(int argc, char *argv[])
if (bg) {
//snprintf(path, sizeof(path), "%s%c%s", SWITCH_GLOBAL_dirs.log_dir, sep, lfile);
ppath = lfile;
signal(SIGHUP, (void *) handle_SIGHUP);
signal(SIGTERM, (void *) handle_SIGHUP);
#ifdef WIN32
FreeConsole();
#else
if ((pid = fork())) {
fprintf(stderr, "%d Backgrounding.\n", (int)pid);
exit(0);
}
#endif
}
@@ -132,19 +145,7 @@ int main(int argc, char *argv[])
if (bg) {
signal(SIGHUP, (void *) handle_SIGHUP);
signal(SIGTERM, (void *) handle_SIGHUP);
#ifdef WIN32
FreeConsole();
#else
if ((pid = fork())) {
fprintf(stderr, "%d Backgrounding.\n", (int)pid);
exit(0);
}
#endif
}
snprintf(path, sizeof(path), "%s%s%s", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR, pfile);
if ((f = fopen(path, "w")) == 0) {