From ba0012c36705dcf847865759af69bba783afb69d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 21 Jun 2006 16:37:48 -0700 Subject: [PATCH] daemon: send stderr to /dev/null instead of closing. Signed-off-by: Junio C Hamano --- daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.43.2