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


Groups > gnu.bash.bug > #14638

Re: bash sockets: printf \x0a does TCP fragmentation

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: bash sockets: printf \x0a does TCP fragmentation
Date 2018-09-22 16:39 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.1143.1537663540.1284.bug-bash@gnu.org> (permalink)
References <c6de6616-dda0-570d-de56-419e7676be8a@cbii-hh.de> <69b48113-bc58-e0c8-a551-03a7e72d88d4@case.edu> <1a70754f-4302-1c96-1ae3-5ab9bdbdf8c3@iki.fi>

Show all headers | View raw


On 9/22/18 6:38 AM, Ilkka Virta wrote:
> On 22.9. 02:34, Chet Ramey wrote:
>> Newline? It's probably that stdout is line-buffered and the newline causes
>> a flush, which results in a write(2).
> 
> Mostly out of curiosity, what kind of buffering logic does Bash (or the
> builtin printf in particular) use? 

Bash sets stdout and stderr to line buffering. It's done this since the
early 1.x days.

-- 
``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/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web