[Bug 1102] C program 'write' with zero length hangs

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Nov 17 09:19:42 EST 2006


http://bugzilla.mindrot.org/show_bug.cgi?id=1102


dtucker at zip.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #1147 is|0                           |1
           obsolete|                            |




------- Comment #18 from dtucker at zip.com.au  2006-11-17 09:19 -------
Created an attachment (id=1208)
 --> (http://bugzilla.mindrot.org/attachment.cgi?id=1208&action=view)
Fixes for bug #1102 as applied to the tree.

> Shouldn't the fix in channels.c 
> +#ifndef PTY_ZEROREAD

It's the other way around, but yes the patch here is wrong.  It got
fixed in the tree, and the fixes are in the 4.4p1 and 4.5p1 releases.

The changes were:

 - (dtucker) [channels.c configure.ac serverloop.c] Bug #1102: Around
AIX
   4.3.3 ML3 or so, the AIX pty layer starting passing zero-length
writes
   on the pty slave as zero-length reads on the pty master, which sshd
   interprets as the descriptor closing.  Since most things don't do
zero
   length writes this rarely matters, but occasionally it happens, and
when
   it does the SSH pty session appears to hang, so we add a special
case for
   this condition.  ok djm@
 - (dtucker) [serverloop.c] Get ifdef/ifndef the right way around for
the bug
   #1102 workaround.
 - (dtucker) [channels.c serverloop.c] Apply the bug #1102 workaround
to ptys
   only, otherwise sshd can hang exiting non-interactive sessions.

These are included in the attached patch.

As for the thing with wish, if you are having a different problem with
a current release then please open a new bug for it (mention this bug#
if you want).  I am going to re-close this bug.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the openssh-bugs mailing list