From: norman@oclsc.org (Norman Wilson)
Subject: [TUHS] EOF on pipes?
Date: Sat, 24 Feb 2018 19:53:13 -0500 [thread overview]
Message-ID: <1519519996.29346.for-standards-violators@oclsc.org> (raw)
Many years ago (when the dinosaurs were using V6), I had a crazy idea[*]
that a write(fd, 0, NULL) would somehow signal EOF to the reader i.e. a
subsequent read would wait for further data instead of ENOTOBACCO.
Did any *nix ever implement that? I have no idea how it would be done.
Have an ENOGORILLA.
To answer the real question: stream pipes, which became the only
sort of pipe in the Research stream (sic) sometime between the
8/e and 9/e manuals.
The implementation was trivial, because from the beginning the
metadata within a stream admitted delimiters: markers that meant
`when this object reaches read(2) at the head end, return from
read with whatever has already been delivered.' Empty messages
(two consecutive delimiters) were explicitly allowed.
If a stream was marked as using delimeters (and pipes always
were), a delimeter was inserted after every write(2). So
write(2) generated an empty message, and read(2) returned it.
Norman Wilson
Toronto ON
next reply other threads:[~2018-02-25 0:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-25 0:53 Norman Wilson [this message]
2018-02-25 16:29 ` Paul Winalski
2018-02-25 22:25 ` Lyndon Nerenberg
2018-02-25 23:18 ` Bakul Shah
2018-02-26 2:39 ` Grant Taylor
-- strict thread matches above, loose matches on Subject: below --
2018-02-27 5:04 Rudi Blom
2018-02-27 5:48 ` Dave Horsfall
2018-02-25 13:07 Doug McIlroy
2018-02-25 13:16 ` George Michaelson
2018-02-25 13:56 ` arnold
2018-02-24 21:33 Dave Horsfall
2018-02-24 23:13 ` Ron Natalie
2018-02-24 23:42 ` Bakul Shah
2018-02-24 23:46 ` Nelson H. F. Beebe
2018-02-24 23:46 ` Jon Steinhart
2018-02-26 16:03 ` Rudi Blom
2018-02-26 16:58 ` Ian Zimmerman
2018-02-26 17:19 ` Larry McVoy
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=1519519996.29346.for-standards-violators@oclsc.org \
--to=norman@oclsc.org \
/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).