bug-coreutils
[Top][All Lists]
Advanced

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

Re: What signal should timeout send when it gets a SIGTERM?


From: Pádraig Brady
Subject: Re: What signal should timeout send when it gets a SIGTERM?
Date: Mon, 08 Mar 2010 10:29:40 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 08/03/10 10:14, Kim Hansen wrote:
2010/3/8 Pádraig Brady<address@hidden>:

An alternative would be to add a new --kill-wait option
which could be used to specify an additional timeout before a KILL 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

That will just nuke it in a hour rather than the more general,
ask it to terminate in an hour, and give it 10s to do so gracefully:

  timeout --kill-wait=10s 1h ./my_program

You can the operation of your command with:

  timeout --signal=KILL --kill-wait=0 1h ./my_program

cheers,
Pádraig.




reply via email to

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