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: Carl Edquist
Subject: Re: [PATCH] tee: Add --pipe-check to allow instantly detecting closed outputs
Date: Tue, 13 Dec 2022 11:19:11 -0600 (CST)

On Tue, 13 Dec 2022, Pádraig Brady wrote:

Thanks to both of you for working through the details on this. This does seem like a useful feature, and would be appropriate to add.

A summarized patch set would be appreciated at this stage, thanks.

Re HAVE_INOTIFY, that's really a proxy for a linux kernel, and so would be most appropriately changed to:

 defined __linux__ || defined __ANDROID__

I'm thinking these hardcoded defines would be best for now at least as it covers the vast majority of systems, and avoids complicated (cross) compile time checks.

A modularised iopoll.c would be better, given the potential uses by other tools, though we'd probably release for just tee initially.

As for interface to this functionality I'm wondering if we could just have the existing tee {-p,--output-error} imply the use of poll() on output.

I.e. from a high level -p just means to deal more appropriately with non file outputs, and as part of that, dealing immediately with closed outputs would be an improvement.

Note also tail(1) enables this functionality by default. I'm not sure about other utilities, but we can deal with that later if needed.

Thanks Pádraig for the feedback - that all sounds good.

Will try to follow-up sometime this week...

Carl


reply via email to

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