Bug 100 - serverloop.c modifications for correct UNICOS behavior
Summary: serverloop.c modifications for correct UNICOS behavior
Status: CLOSED INVALID
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: -current
Hardware: Other Other
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-05 06:20 AEDT by wendy palm
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wendy palm 2002-02-05 06:20:39 AEDT
--- 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)
Comment 1 Markus Friedl 2002-02-05 06:46:33 AEDT
hm, why can't you do while(waitpid) ?
Comment 2 Ben Lindstrom 2002-04-06 06:52:44 AEST
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
Comment 3 wendy palm 2002-04-23 08:40:44 AEST
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;
 }
Comment 4 wendy palm 2002-07-23 08:41:47 AEST
superceeded by bug 367.
Comment 5 Damien Miller 2004-04-14 12:24:17 AEST
Mass change of RESOLVED bugs to CLOSED