tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: SIGPIPE-equivalent before writing?
On Wed, Sep 23, 2026 at 08:28:50AM -0400, Mouse wrote:
> > find / -name foobar | tee check.log | more
>
> > And then after a while I get bored and quit more. Should the tee be
> > killed then, and in turn the find?
>
> A good thought-provoking example. Thank you.
>
> Is there value in saving the filename (or, if found fast enough, the
> first bufferful) found after you quit more in check.log before SIGPIPEs
> take down the find and tee processes?
Is there any guarantee that tee will write down that filename or bufferful
before dying at write() to stdout? Does Posix specify that?
Otherwise this is hardly predictable, given different tee implementations
and buffering choices.
Your suggested early termination looks clearly preferable to me in
this example.
/od2uvb
Home |
Main Index |
Thread Index |
Old Index