Read non-blocking from multiple fifos in parallel
- by Ole Tange
I sometimes sit with a bunch of output fifos from programs that run in parallel. I would like to merge these fifos. The naïve solution is:
cat fifo* > output
But this requires the first fifo to complete before reading the first byte from the second fifo, and this will block the parallel running programs.
Another way is:
(cat fifo1 & cat…