Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jc/upload-corrupt' into next
author
Junio C Hamano
<junkio@cox.net>
Wed, 21 Jun 2006 23:38:11 +0000
(16:38 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Wed, 21 Jun 2006 23:38:11 +0000
(16:38 -0700)
* jc/upload-corrupt:
daemon: send stderr to /dev/null instead of closing.
1
2
daemon.c
patch
|
diff1
|
diff2
|
blob
|
history
raw
|
compact
(merge:
811476d
ba0012c
)
diff --combined
daemon.c
index a19b7b5aaad228396f08b00c9925c555859393b4,0747ce2a37ac90cd89044ab9e5aac688f0e1a269..1ba4d669da346abb5dab86ea7842a7ad4d3e1cde
---
1
/
daemon.c
---
2
/
daemon.c
+++ b/
daemon.c
@@@
-673,11
-673,6
+673,11
@@@
int main(int argc, char **argv
int inetd_mode = 0;
int i;
+ /* Without this we cannot rely on waitpid() to tell
+ * what happened to our children.
+ */
+ signal(SIGCHLD, SIG_DFL);
+
for (i = 1; i < argc; i++) {
char *arg = argv[i];
@@@
-762,7
-757,7
+762,7
@@@
struct sockaddr *peer = (struct sockaddr *)&ss;
socklen_t slen = sizeof(ss);
- f
close(stderr); //FIXME: workaround
+ f
reopen("/dev/null", "w", stderr);
if (getpeername(0, peer, &slen))
peer = NULL;