--- serverloop.c.orig Mon Feb 4 12:32:51 2002 +++ serverloop.c Mon Feb 4 12:43:31 2002 @@ -143,7 +143,9 @@ int save_errno = errno; debug("Received SIGCHLD."); child_terminated = 1; +#ifndef _CRAY mysignal(SIGCHLD, sigchld_handler); +#endif notify_parent(); errno = save_errno; } @@ -673,7 +675,11 @@ /* We no longer want our SIGCHLD handler to be called. */ mysignal(SIGCHLD, SIG_DFL); +#ifdef _CRAY + while((wait_pid = waitpid(-1, &wait_status, child_terminated ? WNOHANG : 0)) && errno == EINTR); +#else wait_pid = waitpid(-1, &wait_status, child_terminated ? WNOHANG : 0); +#endif /* _CRAY */ if (wait_pid == -1) packet_disconnect("wait: %.100s", strerror(errno)); else if (wait_pid != pid)
hm, why can't you do while(waitpid) ?
The following code was committed to OpenSSH to catch some SysV issue. Does this keep UNICOS happy? while ((wait_pid = waitpid(-1, &wait_status, 0)) < 0) if (errno != EINTR) packet_disconnect("wait: %.100s", strerror(errno)); if (wait_pid != pid) error("Strange, wait returned pid %d, expected %d", wait_pid, pid); If so can you close this? - Ben
1st patch is still required, 2nd is not. updated for 22 april snapshot: --- serverloop.c.orig Mon Apr 22 14:35:09 2002 +++ serverloop.c Mon Apr 22 14:36:08 2002 @@ -143,7 +143,9 @@ int save_errno = errno; debug("Received SIGCHLD."); child_terminated = 1; +#ifndef _CRAY mysignal(SIGCHLD, sigchld_handler); +#endif /* !_CRAY */ notify_parent(); errno = save_errno; }
superceeded by bug 367.
Mass change of RESOLVED bugs to CLOSED