sigchld_handler2.

Alain St-Denis Alain.St-Denis at ec.gc.ca
Fri Jan 19 00:43:31 EST 2001


On 2.3.0p1, we have been experiencing the SSH2 stdout truncation problem
that was reported by a few users.

I built the 20010115 snapshot. It seems to correct the problem but
before I was able to test it, I had to change sigchld_handler2 so it
would not reset the signal handler before waitpid is called. On Irix, it
seems a SIGCHLD is delivered for ever...

I haven't tried the last snapshots so I don't know if this was fixed.
Here's a diff of what I did (basically just resetting it as it was for
2.3.0p1):

*** serverloop.c.orig   Thu Jan 18 08:41:13 EST 2001
--- serverloop.c        Wed Jan 17 16:01:41 EST 2001
***************
*** 109,115 ****
        int save_errno = errno;
        debug("Received SIGCHLD.");
        child_terminated = 1;
-       signal(SIGCHLD, sigchld_handler2);
        errno = save_errno;
  }
 
--- 109,114 ----
***************
*** 667,672 ****
--- 666,672 ----
                if (child_terminated) {
                        while ((pid = waitpid(-1, &status, WNOHANG)) >
0)
                                session_close_by_pid(pid, status);
+                       signal(SIGCHLD, sigchld_handler2);
                        child_terminated = 0;
                }
                channel_after_select(&readset, &writeset);


Alain St-Denis
Environment Canada





More information about the openssh-unix-dev mailing list