(I would comment on Keith's answer, but there is still not enough reputation.)
Testing this on OpenBSD, I could not run the scripts by doing:
./a < btoa > atob & ./b < atob > btoa
( atob
and btoa
are FIFO, and the scripts a
and b
duplicate stdin)
However, after I also based on the second one, as soon as I ran > btoa
in my shell (the null command, however, opening btoa
for writing), they started. (Beware of the infinite loop!) I guess that means you need a third process.
I am not sure if the FIFO behavior is standardized in such cases (for example, opening multiple processes for writing).
source share