From 5e8532a5e248965f2ff3cfc01e9dcc307fe5825a Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 8 Dec 2005 23:49:40 +0000 Subject: [PATCH] 2005-12-08 Carl Worth * src/ttt-server.c (main): When detached dup stdout to stderr so that everything appears in the log file. --- ChangeLog | 5 +++++ src/ttt-server.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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); -- 2.43.0