pipe equivalent to /dev/null ???

Dave Eisen dkeisen at Gang-of-Four.Stanford.EDU
Sun Sep 16 05:37:24 AEST 1990


In article <1990Sep11.013805.3594 at chinet.chi.il.us> les at chinet.chi.il.us (Leslie Mikesell) writes:
>In article <8720002 at hpdmd48.boi.hp.com> oscarh at hpdmd48.boi.hp.com (Oscar Herrera) writes:
>
>>	Well, I found the answer to my own question.
>>		touch bitbucket
>>		chmod +x bitbucket
>>		ll | bitbucket      
>
>This will work only so long as the process generating the output doesn't
>generate enough data to fill a pipe buffer.  Since your "null" program
>isn't actually going to read anything, when the pipe fills, the writing
>program will block. 

Small nit. As you said, there is a problem with the pipe buffer filling and 
the write hanging. More serious though is the problem that when bitbucket
runs and dies, any subsequent write by ll will result in ll receiving
a SIGPIPE (write to a pipe with no reader) signal and presumably
being killed.
--
Dave Eisen                      	    Home: (415) 323-9757
dkeisen at Gang-of-Four.Stanford.EDU           Office: (415) 967-5644
1447 N. Shoreline Blvd.
Mountain View, CA 94043



More information about the Comp.unix.shell mailing list