Re: timeout exit codes

Joerg Bashir <[email protected]> Thu, 05 Apr 2007 08:05:30 -0700
Newsgroups gmane.comp.security.forensics.tct
Message-ID <[email protected]>
Dan O'Huiginn wrote:
> 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?

Not sure if you want a public vote, but I vote to make it do what the manpage says.

I'm using the timeout binary from the netatalk package.
# timeout 10 false; echo $?
1

Annoyingly, the usage is slightly different:

Usage: timeout [-s signal] seconds program [args]

You can use a numerical signal, or one of these:

        HUP     INT     QUIT    ILL     TRAP    ABRT    IOT     FPE
        KILL    BUS     SEGV    SYS     PIPE    ALRM    TERM    URG
        STOP    TSTP    CONT    CHLD    CLD     TTIN    TTOU    IO
        XCPU    XFSZ    VTALRM  PROF    WINCH   USR1    USR2    PWR

vs.  tct timeout

usage: ./timeout [-signal] time command...


I tried version 1.17, which does fix it really, but need to coordinate with a few folks before deploying it because of the usage change.  It would be great if they both had more or less the same usage, or at least supported both.  They are both called "timeout" and do more or less the same thing.

-Joerg

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