Skip to content

Commit

Permalink
FS-5238 revert
Browse files Browse the repository at this point in the history
  • Loading branch information
anthmFS committed Apr 22, 2013
1 parent 33c389a commit 7fe448e
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/switch.c
Expand Up @@ -945,6 +945,16 @@ int main(int argc, char *argv[])
}
#endif

if (nc) {
#ifdef WIN32
FreeConsole();
#else
if (!nf) {
daemonize(do_wait);
}
#endif
}

switch (priority) {
case 2:
set_realtime_priority();
Expand All @@ -962,6 +972,7 @@ int main(int argc, char *argv[])

switch_core_setrlimits();


#ifndef WIN32
if (runas_user || runas_group) {
if (change_user_group(runas_user, runas_group) < 0) {
Expand All @@ -971,19 +982,7 @@ int main(int argc, char *argv[])
return 255;
}
}
#endif

if (nc) {
#ifdef WIN32
FreeConsole();
#else
if (!nf) {
daemonize(do_wait);
}
#endif
}

#ifdef WIN32
if (win32_service) {
/* Attempt to start service */
SERVICE_TABLE_ENTRY dispatchTable[] = {
Expand Down

0 comments on commit 7fe448e

Please sign in to comment.