Bug#520323: wrong exit code when timeout not reached

Juha Aatrokoski jha at kurp.hut.fi
Wed Mar 18 19:32:18 UTC 2009

Package: timeout
Version: 1.11-6.5
Severity: important

timeout(1) returns an incorrect exit code (counter to what the man page
says) when the child process exits before the specified timeout.
E.g. "timeout 10 false" returns 0, which makes checking the exit
status useless. This is because the status given by wait(2) is
returned directly, when WEXITSTATUS(status) should be returned
instead. (Of course, using just WEXITSTATUS poses a problem when the
child is terminated by a signal, so this issue should be considered

-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=en_US.ISO-8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages timeout depends on:
ii  libc6                         2.7-18     GNU C Library: Shared libraries

timeout recommends no packages.

timeout suggests no packages.

-- no debconf information

More information about the forensics-devel mailing list