Pádraig Brady <p...@draigbrady.com> writes: > Right. Thanks for discussing the more general pattern. > I.e. that SIGPIPE doesn't cascade back up the pipeline, > only upon attempted write to the pipe. > So it's not really a tee issue, more of a general pattern. > > So it wouldn't be wrong to add this to tee (by default), > but I'm not sure how useful it is given this is a general issue for all > filters. > Also I'm a bit wary of inducing SIGPIPE as traditionally it hasn't been > handled well: > https://www.pixelbeat.org/programming/sigpipe_handling.html
I hesitated making tee poll driven by default because I can imagine someone relying on this behavior. I feel that this is especially useful in the case of teeing pipes because the example I presented isn't very common with other tools, since tee is unique in copying to many outputs, managing the N arbitrary subprocesses can prove difficult. I wouldn't be necessarily opposed to making all the coreutils able to be poll driven, but that'd definitely require some common cross-platform event loopy code ;) Thanks, have a great night. -- Arsen Arsenović
signature.asc
Description: PGP signature