Bugzilla – Attachment 763 Details for
Bug 967
Command only sessions hangs on target system.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
check for pending child after setting up handler
openssh-serverloop-sigchld.patch (text/plain), 1.07 KB, created by
Darren Tucker
on 2005-01-10 23:26:31 AEDT
(
hide
)
Description:
check for pending child after setting up handler
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2005-01-10 23:26:31 AEDT
Size:
1.07 KB
patch
obsolete
>Index: serverloop.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/serverloop.c,v >retrieving revision 1.117 >diff -u -p -r1.117 serverloop.c >--- serverloop.c 13 Aug 2004 11:18:01 -0000 1.117 >+++ serverloop.c 10 Jan 2005 12:21:13 -0000 >@@ -502,6 +502,10 @@ server_loop(pid_t pid, int fdin_arg, int > child_terminated = 0; > mysignal(SIGCHLD, sigchld_handler); > >+ /* XXX */ >+ if ((wait_pid = waitpid(-1, &wait_status, WNOHANG)) > 0) >+ waiting_termination = 1; >+ > /* Initialize our global variables. */ > fdin = fdin_arg; > fdout = fdout_arg; >@@ -674,9 +678,11 @@ server_loop(pid_t pid, int fdin_arg, int > /* We no longer want our SIGCHLD handler to be called. */ > mysignal(SIGCHLD, SIG_DFL); > >- while ((wait_pid = waitpid(-1, &wait_status, 0)) < 0) >+ while (wait_pid < 0) { >+ wait_pid = waitpid(-1, &wait_status, 0); > if (errno != EINTR) > packet_disconnect("wait: %.100s", strerror(errno)); >+ } > if (wait_pid != pid) > error("Strange, wait returned pid %ld, expected %ld", > (long)wait_pid, (long)pid);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 967
:
761
|
762
|
763
|
764
|
767