server: Listen on command socket before daemonizing.
[paraslash.git] / server.c
index 15ae5c9..6b1e11d 100644 (file)
--- a/server.c
+++ b/server.c
@@ -493,6 +493,7 @@ static void server_init(int argc, char **argv)
        gettimeofday(now, NULL);
        set_server_start_time(now);
        init_user_list(user_list_file);
+       init_server_command_task(argc, argv);
        /* become daemon */
        if (conf.daemon_given)
                daemonize();
@@ -518,7 +519,6 @@ static void server_init(int argc, char **argv)
        init_signal_task();
        PARA_NOTICE_LOG("initializing virtual streaming system\n");
        init_vss_task(afs_socket);
-       init_server_command_task(argc, argv);
        PARA_NOTICE_LOG("server init complete\n");
 }