summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/serverloop.c b/serverloop.c
index 0a1bbf1ad..f4fb6b7b5 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: serverloop.c,v 1.127 2006/02/20 17:02:44 stevesk Exp $"); 38RCSID("$OpenBSD: serverloop.c,v 1.128 2006/03/04 04:12:58 djm Exp $");
39 39
40#include <sys/types.h> 40#include <sys/types.h>
41#include <sys/wait.h> 41#include <sys/wait.h>
@@ -152,7 +152,6 @@ static void
152sigchld_handler(int sig) 152sigchld_handler(int sig)
153{ 153{
154 int save_errno = errno; 154 int save_errno = errno;
155 debug("Received SIGCHLD.");
156 child_terminated = 1; 155 child_terminated = 1;
157#ifndef _UNICOS 156#ifndef _UNICOS
158 mysignal(SIGCHLD, sigchld_handler); 157 mysignal(SIGCHLD, sigchld_handler);
@@ -755,6 +754,7 @@ collect_children(void)
755 sigaddset(&nset, SIGCHLD); 754 sigaddset(&nset, SIGCHLD);
756 sigprocmask(SIG_BLOCK, &nset, &oset); 755 sigprocmask(SIG_BLOCK, &nset, &oset);
757 if (child_terminated) { 756 if (child_terminated) {
757 debug("Received SIGCHLD.");
758 while ((pid = waitpid(-1, &status, WNOHANG)) > 0 || 758 while ((pid = waitpid(-1, &status, WNOHANG)) > 0 ||
759 (pid < 0 && errno == EINTR)) 759 (pid < 0 && errno == EINTR))
760 if (pid > 0) 760 if (pid > 0)