Quoting Brian Foster <blf@utvinternet.ie>:
>   | 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 `<f1' will suffice. )
Grrr... I've had that bad habit since MS-DOS 3.2
>  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??
<contrition>
Oops.
</contrition>
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

from localhost (localhost [127.0.0.1])
	by phobos.labs.netnoteinc.com (Postfix) with ESMTP id C8738440A8
	for <jm@localhost>; Wed, 31 Jul 2002 11:33:51 -0400 (EDT)
from phobos [127.0.0.1]
	by localhost with IMAP (fetchmail-5.9.0)
	for jm@localhost (single-drop); Wed, 31 Jul 2002 16:33:51 +0100 (IST)
from lugh.tuatha.org (root@lugh.tuatha.org [194.125.145.45]) by
    dogma.slashnull.org (8.11.6/8.11.6) with ESMTP id g6VFRR230699 for
    <jm-ilug@jmason.org>; Wed, 31 Jul 2002 16:27:27 +0100
from lugh (root@localhost [127.0.0.1]) by lugh.tuatha.org
    (8.9.3/8.9.3) with ESMTP id QAA12792; Wed, 31 Jul 2002 16:25:23 +0100
from dspsrv.com (vir.dspsrv.com [193.120.211.34]) by
    lugh.tuatha.org (8.9.3/8.9.3) with ESMTP id QAA12758 for <ilug@linux.ie>;
    Wed, 31 Jul 2002 16:25:16 +0100
from itg-gw.cr008.cwt.esat.net ([193.120.242.226]
    helo=waider.ie) by dspsrv.com with asmtp (Exim 3.35 #1) id
    17ZvLf-0002G1-00 for ilug@linux.ie; Wed, 31 Jul 2002 16:25:15 +0100
From ilug-admin@linux.ie  Wed Jul 31 16:33:52 2002