Bugzilla – Attachment 1208 Details for
Bug 1102
C program 'write' with zero length hangs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixes for bug #1102 as applied to the tree.
openssh-aix-zeropty.patch (text/plain), 2.19 KB, created by
Darren Tucker
on 2006-11-17 09:19:41 AEDT
(
hide
)
Description:
Fixes for bug #1102 as applied to the tree.
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2006-11-17 09:19:41 AEDT
Size:
2.19 KB
patch
obsolete
>Index: serverloop.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh/serverloop.c,v >retrieving revision 1.137 >retrieving revision 1.140 >diff -u -p -r1.137 -r1.140 >--- serverloop.c 26 Mar 2006 03:25:37 -0000 1.137 >+++ serverloop.c 24 Jun 2006 22:25:25 -0000 1.140 >@@ -387,10 +387,16 @@ process_input(fd_set *readset) > > /* Read and buffer any available stdout data from the program. */ > if (!fdout_eof && FD_ISSET(fdout, readset)) { >+ errno = 0; > len = read(fdout, buf, sizeof(buf)); > if (len < 0 && (errno == EINTR || errno == EAGAIN)) { > /* do nothing */ >+#ifndef PTY_ZEROREAD > } else if (len <= 0) { >+#else >+ } else if ((!isatty(fdout) && len <= 0) || >+ (isatty(fdout) && (len < 0 || (len == 0 && errno != 0)))) { >+#endif > fdout_eof = 1; > } else { > buffer_append(&stdout_buffer, buf, len); >@@ -399,10 +405,16 @@ process_input(fd_set *readset) > } > /* Read and buffer any available stderr data from the program. */ > if (!fderr_eof && FD_ISSET(fderr, readset)) { >+ errno = 0; > len = read(fderr, buf, sizeof(buf)); > if (len < 0 && (errno == EINTR || errno == EAGAIN)) { > /* do nothing */ >+#ifndef PTY_ZEROREAD > } else if (len <= 0) { >+#else >+ } else if ((!isatty(fderr) && len <= 0) || >+ (isatty(fderr) && (len < 0 || (len == 0 && errno != 0)))) { >+#endif > fderr_eof = 1; > } else { > buffer_append(&stderr_buffer, buf, len); >Index: channels.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh/channels.c,v >retrieving revision 1.229 >retrieving revision 1.230 >diff -u -p -r1.229 -r1.230 >--- channels.c 23 Apr 2006 02:06:03 -0000 1.229 >+++ channels.c 23 Jun 2006 11:24:13 -0000 1.230 >@@ -1415,10 +1415,15 @@ channel_handle_rfd(Channel *c, fd_set *r > > if (c->rfd != -1 && > FD_ISSET(c->rfd, readset)) { >+ errno = 0; > len = read(c->rfd, buf, sizeof(buf)); > if (len < 0 && (errno == EINTR || errno == EAGAIN)) > return 1; >+#ifndef PTY_ZEROREAD > if (len <= 0) { >+#else >+ if (len < 0 || (len == 0 && errno != 0)) { >+#endif > debug2("channel %d: read<=0 rfd %d len %d", > c->self, c->rfd, len); > if (c->type != SSH_CHANNEL_OPEN) {
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 1102
:
987
|
988
|
990
|
991
|
992
|
993
|
994
|
1002
|
1147
| 1208