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

1 messages from 2008-08-08 to 2008-08-08. Participants: Andrew Wason.
Thread: https://gitlist.dev/t/14894

## Andrew Wason, 2008-08-08 17:43

Subject: [PATCH] Reinstate SIGCHILD handler, signals on Solaris are reset when handled
Message-ID: <loom.20080808T174216-369@post.gmane.org>
URL: https://gitlist.dev/e/loom.20080808T174216-369%40post.gmane.org

```
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(-)

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

```
