timeout exit codes
Dan O'Huiginn <[email protected]> Thu, 5 Apr 2007 11:11:29 +0200
| Newsgroups | gmane.comp.security.forensics.tct |
|---|---|
| Message-ID | <[email protected]> |
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? 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