bugzilla-daemon at bugzilla.mindrot.org
2009-Nov-20 10:33 UTC
[Bug 1673] New: pseudoterminal option (-t) breaks standard out/error separation
https://bugzilla.mindrot.org/show_bug.cgi?id=1673
Summary: pseudoterminal option (-t) breaks standard out/error
separation
Product: Portable OpenSSH
Version: 5.1p1
Platform: Other
OS/Version: Other
Status: NEW
Severity: normal
Priority: P2
Component: ssh
AssignedTo: unassigned-bugs at mindrot.org
ReportedBy: raker1000 at yahoo.com
When connecting to run commands, standard error ends up mixed with
standard output when using the (-t) pseudoterminal option.
===================Here's an example without pseudoterminal option where it
is working
correctly, and the error messages from the server are captured by fd2
on the client:
---
$ ssh user at server 'uptime ; ls -l /blah' > out 2> err
user at server's password:
$ cat err
ls: cannot access /blah: No such file or directory
$ cat out
05:07:09 up 14 days, 1:40, 4 users, load average: 0.01, 0.02, 0.00
===================And here's an example with pseudoterminal option where
standard error
is mixed in with standard output, and the error messages from the
server are captured by fd1 on the client. The only error message that
went to fd2 was the error from the ssh client executable:
---
$ ssh -t user at server 'uptime ; ls -l /blah' > out 2> err
user at server's password:
$ cat err
Connection to elena closed.
$ cat out
05:07:20 up 14 days, 1:40, 5 users, load average: 0.01, 0.02, 0.00
ls: cannot access /blah: No such file or directory
===================I tested this from solaris8 to solaris8, from solaris8 to
redhat linux,
and from ubuntu linux to ubuntu linux, several versions of
client/server.
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2009-Nov-21 03:52 UTC
[Bug 1673] pseudoterminal option (-t) breaks standard out/error separation
https://bugzilla.mindrot.org/show_bug.cgi?id=1673
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |djm at mindrot.org
Status|NEW |RESOLVED
Resolution| |WONTFIX
--- Comment #1 from Damien Miller <djm at mindrot.org> 2009-11-21 14:52:44
EST ---
This is expected. When a pty is allocated, all of stdin, stdout and
stderr point to the pty (see "ls -l /proc/$$/fd" on Linux). Being on
the other side of the pty, sshd has no way to determine which fd the
child process issued the write() to. Changing the fd allocation so that
stderr was a pipe instead of a pty would be a significant departure
from standard practice and would probably break quite a few things.
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- 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.
bugzilla-daemon at bugzilla.mindrot.org
2009-Nov-22 14:34 UTC
[Bug 1673] pseudoterminal option (-t) breaks standard out/error separation
https://bugzilla.mindrot.org/show_bug.cgi?id=1673 --- Comment #2 from raker1000 at yahoo.com 2009-11-23 01:34:55 EST --- (In reply to comment #1)> This is expected. When a pty is allocated, all of stdin, stdout and > stderr point to the pty (see "ls -l /proc/$$/fd" on Linux). Being on > the other side of the pty, sshd has no way to determine which fd the > child process issued the write() to. Changing the fd allocation so that > stderr was a pipe instead of a pty would be a significant departure > from standard practice and would probably break quite a few things.I see. I wasn't sure whether this was intended behavior. Thank you for the prompt attention. -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- 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.
bugzilla-daemon at bugzilla.mindrot.org
2010-Apr-16 05:51 UTC
[Bug 1673] pseudoterminal option (-t) breaks standard out/error separation
https://bugzilla.mindrot.org/show_bug.cgi?id=1673
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #3 from Damien Miller <djm at mindrot.org> 2010-04-16 15:51:20
EST ---
Mass move of bugs RESOLVED->CLOSED following the release of
openssh-5.5p1
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- 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.