[net.unix-wizards] 4.1cBSD pipe gotcha

gwyn@brl-vld@sri-unix.UUCP (08/31/83)

From:      Doug Gwyn (VLD/VMB) <gwyn@brl-vld>

Would you believe that pipes "succeed" in being stat()ed, but their
(device,inode)s are all identical ((0,0) I believe)?  I sure hope this
is fixed in 4.2BSD, as it really wreaks havoc with programs such as the
"idiot-proof" USG "cat":
	..... | cat file - | .....
determines that its stdout has the same (device,inode) as one of its
inputs and refuses to perform the operation.

How I long for the days when pipes were part of the file system.

P.S.  No flames about whether "cat" should do this safety check, please.
If not "cat", then some other more user-oriented program would want to
do this, so it is not a null issue.