From: doug@cs.dartmouth.edu (Doug McIlroy)
Subject: [TUHS] the sin of buffering [offshoot of excise process from a pipeline]
Date: Tue, 15 Jul 2014 19:43:49 -0400 [thread overview]
Message-ID: <201407152343.s6FNhnUT001960@coolidge.cs.dartmouth.edu> (raw)
Yes, an evil necessary to get things going.
The very definition of original sin.
Doug
Larry McVoy wrote:
>>>> For stdio, of course, one would need fsplice(3), which must flush the
>>>> in-process buffers--penance for stdio's original sin of said buffering.
>>> Err, why is buffering data in the process a sin? (Or was this just a
>>> humourous aside?)
>> Process A spawns process B, which reads stdin with buffering. B gets
>> all it deserves from stdin and exits. What's left in the buffer,
>> intehded for A, is lost. Sinful.
> It really depends on what you want. That buffering is a big win for
> some use cases. Even on today's processors reading a byte at a time via
> read(2) is costly. Like 5000x more costly on the laptop I'm typing on:
next reply other threads:[~2014-07-15 23:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-15 23:43 Doug McIlroy [this message]
2014-07-16 0:32 ` Larry McVoy
2014-07-16 3:53 ` John Cowan
2014-07-16 4:05 ` Larry McVoy
2014-07-16 6:03 ` John Cowan
2014-07-16 14:30 ` Larry McVoy
2014-07-16 14:56 ` Dan Cross
2014-07-16 15:41 ` Larry McVoy
-- strict thread matches above, loose matches on Subject: below --
2014-07-16 21:46 Noel Chiappa
2014-07-15 2:31 Doug McIlroy
2014-07-15 2:40 ` Larry McVoy
2014-07-15 18:55 ` scj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201407152343.s6FNhnUT001960@coolidge.cs.dartmouth.edu \
--to=doug@cs.dartmouth.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).