]> git.cworth.org Git - ttt/commitdiff
2005-12-08 Carl Worth <cworth@cworth.org>
authorCarl Worth <carl@theworths.org>
Thu, 8 Dec 2005 23:49:40 +0000 (23:49 +0000)
committerCarl Worth <carl@theworths.org>
Thu, 8 Dec 2005 23:49:40 +0000 (23:49 +0000)
        * src/ttt-server.c (main): When detached dup stdout to stderr so
        that everything appears in the log file.

ChangeLog
src/ttt-server.c

index 640a333683480e7bdc9171566aeb2c61e2e08bc2..7fb5319b78584b5f81daf6a906640470f5ba73f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-08  Carl Worth  <cworth@cworth.org>
+
+       * src/ttt-server.c (main): When detached dup stdout to stderr so
+       that everything appears in the log file.
+
 2005-12-08  Carl Worth  <cworth@cworth.org>
 
        * src/ttt-args.h:
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);