threads / patch / 14894

patchReinstate SIGCHILD handler, signals on Solaris are reset when handled

Subject: [PATCH] Reinstate SIGCHILD handler, signals on Solaris are reset when handled

## tl;dr

One message between Aug 8, 2008 and Aug 8, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Andrew Wason· Aug 8, 2008, 17:43 UTC · lore

git-daemon only reaps the first forked child on Solaris. Solaris signal handlers have to be reset each time the signal is handled.

Signed-off-by: Andrew Wason <rectalogic@rectalogic.com>
---
 daemon.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Show changes to daemon.c +2 −0
diff --git a/daemon.c b/daemon.c
index 4540e8d..47ad8ab 100644
--- a/daemon.c
+++ b/daemon.c
@@ -794,6 +794,8 @@ static void child_handler(int signo)
 		}
 		break;
 	}
+	/* Signal handlers must be reinstated on Solaris */
+	signal(SIGCHLD, child_handler);
 }
 
 static int set_reuse_addr(int sockfd)
-- 
1.5.6.2

← back to recent threads