daemon: send stderr to /dev/null instead of closing.
[git/git.git] / daemon.c
index bdfe80d..0747ce2 100644 (file)
--- 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;