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);