]> git.cworth.org Git - ttt/blobdiff - src/ttt-server.c
2005-12-08 Carl Worth <cworth@cworth.org>
[ttt] / src / ttt-server.c
index 34159b547ddb0b0946ef97d5a655646259223c07..5d951fd40d5843430d89937687285c431ff90223 100644 (file)
@@ -307,10 +307,12 @@ main (int argc, char **argv)
 
     socket = ttt_socket_create_server (args.host, args.port);
 
-    if (args.detach)
+    if (args.detach) {
+       xdup2 (2, 1);
        printf ("Server started listening on %s:%s\n", args.host, args.port);
-    else
+    } else {
        printf (WELCOME_MESSAGE, args.host, args.port, args.host, args.port);
+    }
 
     fclose (stdout);
     fclose (stdin);