Mailing List Archive

[Bug 3448] heredoc lines get consumed by previous statement
https://bugzilla.mindrot.org/show_bug.cgi?id=3448

Damien Miller <djm@mindrot.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |djm@mindrot.org

--- Comment #1 from Damien Miller <djm@mindrot.org> ---
AFAIK it's the shell that is getting confused. ssh is propagating the
stdin close correctly from the client:

> debug2: PTY allocation request accepted on channel 0
> debug2: channel 0: rcvd adjust 2097152
> debug3: receive packet: type 99
> debug2: channel_input_status_confirm: type 99 id 0
> debug2: shell request accepted on channel 0
> debug2: channel 0: read<=0 rfd 4 len 0: closed
> debug2: channel 0: read failed
> debug2: chan_shutdown_read: channel 0: (i0 o0 sock -1 wfd 4 efd 6 [write])

to the server:

> Starting session: shell on pts/7 for djm from 127.0.0.1 port 37500 id 0
> debug2: fd 3 setting TCP_NODELAY
> debug3: set_sock_tos: set socket 3 IP_TOS 0x48
> debug2: channel 0: rfd 8 isatty
> debug2: fd 8 setting O_NONBLOCK
> debug3: fd 6 is O_NONBLOCK
> debug3: send packet: type 99
> debug1: Setting controlling tty using TIOCSCTTY.
> debug3: receive packet: type 96
> debug2: channel 0: rcvd eof
> debug2: channel 0: output open -> drain
> debug2: channel 0: obuf empty
> debug2: chan_shutdown_write: channel 0: (i0 o1 sock -1 wfd 6 efd -1 [closed])
> debug2: channel 0: output drain -> closed

It's possible that bash/zsh is getting confused by its stdin being
nonblock, but there isn't much that ssh/sshd can do about that without
reintroducing bug #3280

It does seem to behave better when a PTY is not requested (i.e. remove
the -t flags)

--
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs