From: H. Peter Anvin Date: Fri, 30 Sep 2005 18:01:57 +0000 (-0700) Subject: Move signal setting into service_loop() X-Git-Tag: v0.99.9~206 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9220282a9c6fae98d326bd10e4f427f1692b71ed;p=git.git Move signal setting into service_loop() --- diff --git a/daemon.c b/daemon.c index fc5e1c303..f285a8c98 100644 --- a/daemon.c +++ b/daemon.c @@ -480,6 +480,8 @@ static int service_loop(int socknum, int *socklist) pfd[i].fd = socklist[i]; pfd[i].events = POLLIN; } + + signal(SIGCHLD, child_handler); for (;;) { int i; @@ -518,8 +520,6 @@ static int serve(int port) { int socknum, *socklist; - signal(SIGCHLD, child_handler); - socknum = socksetup(port, &socklist); if (socknum == 0) die("unable to allocate any listen sockets on port %u", port);