[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What signal should timeout send when it gets a SIGTERM?
From: |
Kim Hansen |
Subject: |
Re: What signal should timeout send when it gets a SIGTERM? |
Date: |
Mon, 8 Mar 2010 11:14:45 +0100 |
2010/3/8 Pádraig Brady <address@hidden>:
> On 08/03/10 07:17, Jim Meyering wrote:
>>
>> Pádraig Brady wrote:
>>>
>>> Perhaps we could handle all cases with
>>> the equivalent of:
>>>
>>> if (sig==TERM&& user_sig==KILL) {
>>> send(sig); /* give chance to term gracefully */
>>> sleep(1);
>>> send(KILL); /* nuke it from orbit */
>>> }
>>
>> If the child program's signal-triggered clean-up code takes more than that
>> one second, kill-9 would probably leave things in an inconsistent state.
>
> Yes, that's true, and I'd be against doing the above
> as it could cause intermittent weird behavior.
>
> An alternative would be to add a new --kill-wait option
> which could be used to specify an additional timeout before a SIGKILL was
> sent.
> That would be a general mechanism to terminate "normally" after the timeout
> or when SIGTERM etc. is sent, but then always setup another timeout
> to send SIGKILL if the monitored command does not exit.
An other alternative is to add a new --term-signal option that could
be used to tell what signal the user want forwarded if the timeout
command gets a TERM. Then I could use the command like this:
timeout --signal=KILL --term-signal=KILL 1h ./my_program
--
Kim Hansen
Vadgårdsvej 3, 2.tv
2860 Søborg
Fastnet: 3956 2437 -- Mobil: 3091 2437
- What signal should timeout send when it gets a SIGTERM?, Kim Hansen, 2010/03/07
- Re: What signal should timeout send when it gets a SIGTERM?, Pádraig Brady, 2010/03/07
- Re: What signal should timeout send when it gets a SIGTERM?, Jim Meyering, 2010/03/08
- Re: What signal should timeout send when it gets a SIGTERM?, Pádraig Brady, 2010/03/08
- Re: What signal should timeout send when it gets a SIGTERM?,
Kim Hansen <=
- Re: What signal should timeout send when it gets a SIGTERM?, Pádraig Brady, 2010/03/08
- Re: What signal should timeout send when it gets a SIGTERM?, Pádraig Brady, 2010/03/15
- Re: What signal should timeout send when it gets a SIGTERM?, Jim Meyering, 2010/03/16
- Re: What signal should timeout send when it gets a SIGTERM?, Pádraig Brady, 2010/03/16
- Re: What signal should timeout send when it gets a SIGTERM?, Jim Meyering, 2010/03/16
- Re: What signal should timeout send when it gets a SIGTERM?, Jim Meyering, 2010/03/17
- Re: What signal should timeout send when it gets a SIGTERM?, Eric Blake, 2010/03/17
- Re: What signal should timeout send when it gets a SIGTERM?, Pádraig Brady, 2010/03/17
- Re: What signal should timeout send when it gets a SIGTERM?, Kim Hansen, 2010/03/21
Re: What signal should timeout send when it gets a SIGTERM?, Kim Hansen, 2010/03/08