On 2/24/18, Norman Wilson <norman(a)oclsc.org> wrote:
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.
The pipe device driver that I wrote for VMS implemented EOF.
Mailboxes (the moral equivalent of pipes in VMS) had a WRITE_EOF I/O
command in addition to the usual WRITE. This placed a special record
in the mailbox's data stream that caused the driver to return
end-of-file when a READ was done instead of simply waiting for further
data. My pipe driver had to be fully compatible with mailboxes, so it
also had WRITE_EOF.
-Paul W.