[TUHS] EOF on pipes?

Paul Winalski paul.winalski at gmail.com
Mon Feb 26 02:29:50 AEST 2018

On 2/24/18, Norman Wilson <norman at 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.

More information about the TUHS mailing list