4.1cBSD pipe gotcha

gwyn at brl-vld gwyn at brl-vld
Wed Aug 31 12:44:25 AEST 1983


From:      Doug Gwyn (VLD/VMB) <gwyn at 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.



More information about the Comp.unix.wizards mailing list