[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature enhancement for 'timeout'
From: |
Pádraig Brady |
Subject: |
Re: feature enhancement for 'timeout' |
Date: |
Tue, 25 Feb 2014 17:04:19 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 02/25/2014 04:57 PM, Thomas Sattler wrote:
> Am 25.02.2014 17:30, schrieb Pádraig Brady:
>> On 02/25/2014 04:10 PM, Thomas Sattler wrote:
>>> How about exporting the DURATION to the command's environment?
>>
>> So you mean for timeout(1) to inspect the env and honor a DURATION there?
>
> No, I thought of timeout(1) informing its child process about the
> duration. So the command could know about the timeout. (Just for
> the unusual case where it could want to know and care about it.)
>
> I'm aware that most commands run via timeout(1) will not make use
> of this. On the other hand letting timeout(1) put the duration
> into its client process' environment shouldn't hurt either.
I'm getting it hard to think of a use case where
the managed command could make use of prior knowledge of the timeout.
Related to this is the --preserve-status, where timeout(1)
can indicate with a signal to the command when the DURATION expires,
at which time the command can cleanup normally and timeout(1)
will then propagate the status of the managed command.
thanks,
Pádraig.