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 09:54:36 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 10/29/2012 08:44 AM, Jim Meyering wrote:
Pádraig Brady wrote:
...
Subject: [PATCH] timeout: add --exit-status to always propagate the command's
  exit status

It's useful for commands that support running for an indeterminite
amount of time, to not return a specific timeout exit status (124),
and instead let the command handle the timeout signal and return
a status for the work done so far.

* doc/coreutils.texi (timeout invocation): Describe the new option.
* src/timeout.c (use_exit_status): A new global boolean to
enable the --exit-status behavior.

Thanks.  This looks fine.

Did you consider calling it --preserve-exit-status?
That seems more descriptive to me, since it preserves the exit
status of the command that timeout runs.
When I first saw --exit-status, I wondered if it should have an =N
after it, by which to specify a specific number.

Yes I did.
--preserve-exit-status is better, but worse because it's longer.
Maybe split the difference with --preserve-status ?

thanks,
Pádraig.





reply via email to

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