From: Carl Worth Date: Thu, 8 Dec 2005 23:49:40 +0000 (+0000) Subject: 2005-12-08 Carl Worth X-Git-Url: https://git.cworth.org/git?p=ttt;a=commitdiff_plain;h=5e8532a5e248965f2ff3cfc01e9dcc307fe5825a;ds=sidebyside 2005-12-08 Carl Worth * src/ttt-server.c (main): When detached dup stdout to stderr so that everything appears in the log file. --- diff --git a/ChangeLog b/ChangeLog index 640a333..7fb5319 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-12-08 Carl Worth + + * src/ttt-server.c (main): When detached dup stdout to stderr so + that everything appears in the log file. + 2005-12-08 Carl Worth * src/ttt-args.h: diff --git a/src/ttt-server.c b/src/ttt-server.c index 34159b5..5d951fd 100644 --- a/src/ttt-server.c +++ b/src/ttt-server.c @@ -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);