Re: timeout exit codes

[email protected] (Wietse Venema) Thu, 5 Apr 2007 10:00:01 -0400 (EDT)
Newsgroups gmane.comp.security.forensics.tct
Message-ID <[email protected]>
Dan O'Huiginn:
> Greetings,
> 
> According to the timeout man page, ""timeout's exit status is the exit status 
> of the specified command or  1 in case of a usage error."
> 
> In practice, however, this isn't what happens. Timeout returns 0 provided a 
> command doesn't timeout, regardless of the exit status of that command. So:
> 
> $ false; echo $?
> 1
> $ timeout 10 false; echo $?
> 0
> 
> This bug has been known in Debian since at least 2003 [1], and has more 
> recently also been reported in Ubuntu [2]. The Debian maintainer was 
> reluctant to fix the bug without an OK from you folks here, presumably for 
> fear of inadvertently breaking something else.
> 
> I'd like to fix this one way or the other -  for Ubuntu in particular, but I 
> guess also elsewhere. That is, either patch the program to behave as 
> documented, or edit the man page to match the actual behaviour. Which would 
> you prefer?

There are some patched floating around that fix one problem
and introduce another one.

tct-1.17 fixes it really, and will be released soon.

	Wietse

> best wishes,
> Dan O'Huiginn
> 
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=187092
> [2] https://bugs.launchpad.net/ubuntu/+source/tct/+bug/78742
> 
>