coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tee: Add --pipe-check to allow instantly detecting closed ou


From: Arsen Arsenović
Subject: Re: [PATCH] tee: Add --pipe-check to allow instantly detecting closed outputs
Date: Tue, 29 Nov 2022 22:10:16 +0100

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ć

Attachment: signature.asc
Description: PGP signature


reply via email to

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