Bug 1983 - add an option for disabling buffering
Summary: add an option for disabling buffering
Status: CLOSED WORKSFORME
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 5.9p1
Hardware: All All
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-22 11:38 AEDT by Andrew McNabb
Modified: 2015-08-11 23:03 AEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew McNabb 2012-02-22 11:38:49 AEDT
Output is aggressively buffered when no pseudo-terminal is available. For long-running commands, users have no way of checking how much progress has been made, even if the command gives regular output. If ssh had, say, a "LineBuffering" or "DisableBuffering" option, then users could control this behavior.
Comment 1 Damien Miller 2012-03-09 10:11:15 AEDT
ssh generally tries to get data moved from its buffers at the earliest possible time. What problem are you experiencing and can you provide a recipe to reproduce it?
Comment 2 Darren Tucker 2012-03-09 10:15:34 AEDT
Are you sure it's not the remote command that's causing the buffering? 
sshd will send output to the network as soon as it's available,
although it may get buffered in the TCP stack.

this:
$ ssh localhost "tty; while sleep 1; do date; done"

gives me "not a tty" and output at approximately 1 second intervals.
Comment 3 Andrew McNabb 2012-03-10 03:13:20 AEDT
I'm sorry; you're completely right. I should have looked into this a bit more. I opened this because of a user report, and I should have been more careful. It turns out that the user was running a Python script, and Python buffers stdout aggressively by default. There are easy workarounds, none of which involve changing the behavior of ssh. :)  Sorry for the noise.
Comment 4 Damien Miller 2015-08-11 23:03:41 AEST
Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1