coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enhancement request for tee - please add the option to not quit on S


From: Bernhard Voelker
Subject: Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened
Date: Fri, 20 Nov 2015 18:24:33 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 11/20/2015 03:35 PM, Jirka Hladky wrote:
> I have tried two versions of the main command (one with >/dev/full, other one 
> with >&-). 
> 
> cat /dev/zero | head -c500M | (/dev/shm/AAA/coreutils-8.24/src/tee -p 
> $d/fifo1 $d/fifo2 $d/fifo3 $d/fifo4 >/dev/full )
> 2>&1 | tee $d/run.log &
> and
> cat /dev/zero | head -c500M | (/dev/shm/AAA/coreutils-8.24/src/tee -p 
> $d/fifo1 $d/fifo2 $d/fifo3 $d/fifo4 >&- ) 2>&1 |
> tee $d/run.log &
> 
> Both of them are working fine, except that following messages are emitted:
> 
> tee: standard output: No space left on device
> tee: standard output: Bad file descriptor

I'm not convinced that a new --no-stdout option is warranted:
why not simply redirect stdout to the last fifo?

  cat /dev/zero | head -c500M \
    | (/dev/shm/AAA/coreutils-8.24/src/tee -p \
         $d/fifo1 $d/fifo2 $d/fifo3 > $d/fifo4 ) 2>&1 \
    | > tee $d/run.log &

Have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]