So do modern Linux pipes work bi-directionally? Of course the shell doesn't use them like that. But that does not necessarily mean that the kernel wouldn't support it. I vaguely remember that a colleague used a pipe bi-directionally between 2 C programs he wrote. To my surprise it mostly worked. IIRC there were some minor issues make him giving up the approach. The big surprise for me was that it worked at all. Or is it just racy beyond all control that you read back your own data if the other end has happened not to empty the buffer?