From: Andre Noll Date: Tue, 20 Sep 2011 10:13:16 +0000 (+0200) Subject: server: Listen on command socket before daemonizing. X-Git-Tag: v0.4.9~12^2~2 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=7a4b6d5f19976ceac581f6dc235fcbd9b30c767f;p=paraslash.git server: Listen on command socket before daemonizing. This makes sure that para_server is already listening on its TCP command socket before it detaches from the console. This is desirable because otherwise commands like para_server -d -L /dev/null && para_client help may fail due to para_client connecting before para_server starts to listen. --- diff --git a/server.c b/server.c index 15ae5c9a..6b1e11d6 100644 --- 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"); }