diff options
author | Denis Vlasenko | 2007-04-03 01:13:04 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-04-03 01:13:04 +0000 |
commit | 992e05b6f070562d83f9238b227e1ddbf951c9af (patch) | |
tree | c64729c60f929f3007b4ed93543291b52cb50a02 /ipsvd/tcpsvd.c | |
parent | cea0a8bccbb0d98eb0e7423e6fff0d8529db8efe (diff) | |
download | busybox-992e05b6f070562d83f9238b227e1ddbf951c9af.zip busybox-992e05b6f070562d83f9238b227e1ddbf951c9af.tar.gz |
udpsvd: more work on it. works in limited testing.
Diffstat (limited to 'ipsvd/tcpsvd.c')
-rw-r--r-- | ipsvd/tcpsvd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ipsvd/tcpsvd.c b/ipsvd/tcpsvd.c index 98234a7..056deff 100644 --- a/ipsvd/tcpsvd.c +++ b/ipsvd/tcpsvd.c @@ -179,7 +179,10 @@ int tcpsvd_main(int argc, char **argv) if (!argv[0][0] || LONE_CHAR(argv[0], '0')) argv[0] = (char*)"0.0.0.0"; + /* stdout is used for logging, don't buffer */ setlinebuf(stdout); + bb_sanitize_stdio(); /* fd# 1,2 must be opened */ + need_hostnames = verbose || !(option_mask32 & OPT_E); need_remote_ip = max_per_host || need_hostnames; @@ -232,7 +235,6 @@ int tcpsvd_main(int argc, char **argv) xsetuid(ugid.uid); } #endif - bb_sanitize_stdio(); /* fd# 1,2 must be opened */ close(0); if (verbose) { @@ -439,6 +441,7 @@ int tcpsvd_main(int argc, char **argv) xmove_fd(conn, 0); dup2(0, 1); + signal(SIGTERM, SIG_DFL); signal(SIGPIPE, SIG_DFL); signal(SIGCHLD, SIG_DFL); |