bug-coreutils
[Top][All Lists]
Advanced

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

bug#6308: Preserve command exit code in timeout(3)


From: Pádraig Brady
Subject: bug#6308: Preserve command exit code in timeout(3)
Date: Mon, 29 Oct 2012 00:43:27 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 10/22/2012 01:27 PM, Thomas Krennwallner wrote:
On Mon Oct 22, 2012 10:20:14AM +0100, Pádraig Brady wrote:
On 10/21/2012 09:36 PM, Thomas Krennwallner wrote:
[...]
I'm thus very interested into seeing timeout --exit-status.

Ok cool.

It's tempting to support this without an option.
I.E. for all commands that exit without WIFSIGNALED being set,
i.e. for all commands that catch and exit on signal reception.
However that wouldn't work in general I think due to cascading
timeout commands or commands that catch signals for cleanup etc.,
though I suppose the latter case might be catered for by
specifying a specific signal with the -s option.

Yes, I completely agree.  And would only make a difference for programs
that carry on meaning with their exit code, i.e., where the code depends
on the computation, as described in my use case.  The default use is
IMHO just error exit in programs, and most have it implemented this way
(think of clean-up at signal reception).  Having a default exit code of
124 is good for those standard programs.

So I'll look at adding this new option right after the
imminent 8.20 release.

Thank you, this sounds like good news!

Proposed patch is attached.

thanks,
Pádraig.

Attachment: timeout-exit-status.diff
Description: Text Data


reply via email to

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