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: Mon, 12 Dec 2022 15:41:57 -0600 (CST)

On Mon, 12 Dec 2022, Arsen Arsenović wrote:

Hi Rob,

Rob Landley <rob@landley.net> writes:

This sort of thing is why I added -i to toybox's "timeout" command:

    -i  Only kill for inactivity (restart timeout when command produces output)

It runs the command's stdout through a pipe and does a poll() with the -i seconds value, and signals the program if the poll() expires.

The android guys found it useful, but I was waiting to hear back about "cut -DF" before bringing it up here...

That's interesting, might be worth adding to the GNU timeout, however, it's not appropriate for what I'm using tee for, since compiler processes could appear idle for a long time, if doing LTO for instance.

Thanks Rob for the idea.

Sounds like it could be useful if you know what an appropriate timeout ought to be ... though in the general data-driven case i feel like filters should only quit for relevant events like end-of-input or write failure. (The broken-pipe detection idea being an extension that detects the point when future writes will fail.)

Sounds like a neat idea to add to a timeout command (where you know the output timeout you want) if it can be made to work with arbitrary programs.

Carl


reply via email to

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