Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14666 > unrolled thread

Re: bash sockets: printf \x0a does TCP fragmentation

Started byChet Ramey <chet.ramey@case.edu>
First post2018-09-26 10:00 -0400
Last post2018-09-26 10:00 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: bash sockets: printf \x0a does TCP fragmentation Chet Ramey <chet.ramey@case.edu> - 2018-09-26 10:00 -0400

#14666 — Re: bash sockets: printf \x0a does TCP fragmentation

FromChet Ramey <chet.ramey@case.edu>
Date2018-09-26 10:00 -0400
SubjectRe: bash sockets: printf \x0a does TCP fragmentation
Message-ID<mailman.1347.1537970484.1284.bug-bash@gnu.org>
On 9/26/18 2:17 AM, Dirk Wetter wrote:

>> then what happens if "$data" is
>> a paragraph of text with embedded newlines.  In that case,
>> it sounds like bash might break apart the single printf
>> output into smaller packets rather than transmitting the
>> entirety of "$data" in 1 write (presuming it is less than
>> the maximum data size for a network packet).
> 
> yup.
> 
> Wonder why the coreutils printf behaves (in my sense) better
> than the bash-builtin.

The answer's the same as it was last week: because bash line-buffers
stdout and stderr, which it has done since early 1992.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web