bug-coreutils
[Top][All Lists]
Advanced

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

bug#6900: mktemp: want option to make a fifo


From: John Reiser
Subject: bug#6900: mktemp: want option to make a fifo
Date: Tue, 24 Aug 2010 10:42:08 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc11 Thunderbird/3.0.4

> The two requests would have been more convincing if they demonstrated
> a definite need.

Another case: "pipe" stderr into a separate pipeline from stdout.
This is useful for stderr as a status channel.

    fifo_stderr1=$(mktemp --fifo stderr.XXXXXX)
    fifo_stderr2=$(mktemp --fifo stderr.XXXXXX)
    listener1 < $fifo_stderr1 &
    listener2 < $fifo_stderr2 &
    cmd1  2> $fifo_stderr1  |  cmd2  2> $fifo_stderr2

Another case: Use file descriptor 3 as a command and control channel.
Output has two default file descriptors (stdout and stderr), why not
input (stdin and cmdin)?  This is especially helpful for repairing a
nest of processes that are connected by pipes.

   fifo_cmdin1=$(mktemp --fifo cmdin.XXXXXX); sleep 999000 > $fifo_cmdin1 &
   fifo_cmdin2=$(mktemp --fifo cmdin.XXXXXX); sleep 999000 > $fifo_cmdin2 &
   cmd1  3< $fifo_cmdin1  |  cmd2  3< $fifo_cmdin2  &
   echo quit  > $fifo_cmdin1

-- 





reply via email to

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