On 19:56 06 Mar 2003, Dan Bar Dov <[EMAIL PROTECTED]> wrote:
| The last pipe to tee is the problem. I can't do that. I need to send the
| input from several locations, and they do terminate.

The problem is that the pipe sees all the handles go away, and sends EOF to
your gzip. Keep at least one write always open. Eg:

        mknod foo p
        gzip <foo >foo.gz &     # will block until first open
        exec 4>foo              # open of foo but no close
        echo hi >p              # separate open and close of foo here
        echo there >p           # separate open and close of foo here
        exec 4>&-               # close of last handle sends final EOF

While fd 4 is lying around holding the pipe open your gzip will be
happy. All your other programs can happily open the pipe and write and
close it and the gzip will get it all. Obviously you will be splitting
the above example up, but I hope the approach is now clear?

Cheers,
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

..And in all of Babylonia there was wailing and gnashing of teeth, till
the prophets bade the multitudes get a grip on themselves and shape up.
        - Woody Allen



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to