Re: [ILUG] Piping to multiple processes (which might die)? Quoting Brian Foster : >   | I did the following: >   |  >  1|   $ mkfifo f1 >  2|   $ lav2yuv capture.avi | yuvdenoise | tee f1 | mpeg2enc blah blah & >  3|   $ cat f1 | mpeg2enc different blah blah >   |  >   | And hey! It works!  Until somebody dies!  Yippe... oh.  [ ... ] >  >  ( a winner of the Useless Use of cat(1) Award:  you don't need >   the `cat f1 |' in the 3rd line, a simple `  upshot is a POSIX.2 `tee' would probably spit out an error >  message if one of the `mpeg2enc's dies, but the remaining >  one would continue to be fed data and hence run until it >  either completes or dies for reasons of its own.  which is >  exactly what you want!   so what is happening??   Oops. Um, my test was to tee to a fifo I didn't read from... resulting in the other reader hanging around forever.... not realising that never-opened-for-reading and opened-and-later-closed might be different.  Sensible behaviour has now been observed.   >  incidently, if your shell and system both support process >  redirection, you could do the above as a one-liner.  syntax >  varies depending on the shell, but in bash(1) and ksh(1): >  >      lav2yuv capture.avi | yuvdenoise | \ >          tee >(mpeg2enc different blah blah) | mpeg2enc blah blah mpeg2enc generates stats during the run, so I give each one an xterm. Thanks, Ronan --  Irish Linux Users' Group: ilug@linux.ie http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information. List maintainer: listmaster@linux.ie