if you're using a filesystem-based pipe like a fifo, you could simplify it further with a unix-domain socket.