From: Junio C Hamano Date: Wed, 21 Jun 2006 23:37:48 +0000 (-0700) Subject: daemon: send stderr to /dev/null instead of closing. X-Git-Tag: v1.4.1-rc1~4^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ba0012c36705dcf847865759af69bba783afb69d?ds=sidebyside daemon: send stderr to /dev/null instead of closing. Signed-off-by: Junio C Hamano --- diff --git a/daemon.c b/daemon.c index bdfe80d2e4..0747ce2a37 100644 --- a/daemon.c +++ b/daemon.c @@ -757,7 +757,7 @@ int main(int argc, char **argv) struct sockaddr *peer = (struct sockaddr *)&ss; socklen_t slen = sizeof(ss); - fclose(stderr); //FIXME: workaround + freopen("/dev/null", "w", stderr); if (getpeername(0, peer, &slen)) peer = NULL;