patch to sereverloop.c
William L. Jones
jones at hpc.utexas.edu
Fri Feb 2 08:33:26 EST 2001
This is a repost of a patch that I submitted earlier. It is in unified
diff format this time. If move the reinstallation of the SIGCHLD
signal handler from isgchld_handler2 back in the server2 loop.
AIX and IRIX both will keep calling the sigchld_handler2 open the return
from sigchld_handler2 if the SIGCHLD signal is reinstalled in
sigchld_handler2 since both os expact that all children will be reaped
in the SIGCHLD signal handler. The causes a infinite loop were the sigchld_handler2 is called until openssh runs out of stack space a core
dumps on logout when the ssh version 2 protocol is used.
Bill Jones
-------------- next part --------------
--- serverloop.c.orig Thu Feb 1 14:56:30 2001 +++ serverloop.c Thu Feb 1 14:57:31 2001 @@ -110,7 +110,6 @@ int save_errno = errno; debug("Received SIGCHLD."); child_terminated = 1; - signal(SIGCHLD, sigchld_handler2); errno = save_errno; } @@ -664,6 +663,7 @@ while ((pid = waitpid(-1, &status, WNOHANG)) > 0) session_close_by_pid(pid, status); child_terminated = 0; + signal(SIGCHLD, sigchld_handler2); } channel_after_select(readset, writeset); process_input(readset);
More information about the openssh-unix-dev
mailing list