]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5238 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 27 Mar 2013 21:50:10 +0000 (16:50 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 27 Mar 2013 21:50:10 +0000 (16:50 -0500)
src/switch.c

index f86b080996e03b1d876ff5935667cd4ea7879981..68f6af341dd408125cddd7d1bf78a75d69276112 100644 (file)
@@ -929,16 +929,6 @@ 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();
@@ -956,7 +946,6 @@ 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) {
@@ -966,7 +955,19 @@ 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[] = {