bug-coreutils
[Top][All Lists]
Advanced

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

bug#51135: timeout: --foreground causes exit status 124, even if KILL wa


From: Christoph Anton Mitterer
Subject: bug#51135: timeout: --foreground causes exit status 124, even if KILL was used
Date: Tue, 12 Oct 2021 15:59:25 +0200
User-agent: Evolution 3.42.0-2

On Tue, 2021-10-12 at 14:50 +0100, Pádraig Brady wrote:
> That is a fair point.

Thanks for reconsidering :-)


> If one is using --kill-after you have to
> check for both 124 and 137 anyway to see if it timed out.
> It is useful to know whether the command was forcably killed.
> Using --foreground to avoid the 137 exit status upon --kill-after
> is not until now documented, so we should probably adjust
> the exit status to be always 137 if a SIGKILL is sent.
> 
> With the attached we now behave like:
> 
>    $ timeout -v -s0 --foreground -k2 1 sleep 3; echo $?
>    timeout: sending signal EXIT to command ‘sleep’
>    timeout: sending signal KILL to command ‘sleep’
>    137
> 
>    $ timeout -v -s0 -k2 1 sleep 3; echo $?
>    timeout: sending signal EXIT to command ‘sleep’
>    timeout: sending signal KILL to command ‘sleep’
>    Killed
>    137

Great :-)


Cheers,
Chris.





reply via email to

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