Your message dated Sat, 18 May 2013 10:13:15 +0300 (EEST)
with message-id <[email protected]>
and subject line Bug #639197 filed against the timeout package
has caused the Debian Bug report #639197,
regarding timeout program does not return exit status of executed program
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
639197: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=639197
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: timeout
Version: 1.11-6.5
Severity: normal
Tags: patch


The timeout program  does not return the exit status of the program it runs, 
although it is documented to do so.

The problem is that wait(2) returns a 16-bit integer, with the exit status in 
the high bits and the signal information in the low bits.  This value 
is passed unmodified to exit(2), which expects an 8-bit integer with just the 
exit status.

This is fixed in the latest version of The Coroner's Toolkit, by using 
WEXITSTATUS and WTERMSIG to compute an exit value.

This patch modifies the 1.11 version of timeout included in Lenny to have the 
same behavior.

-- System Information:
Debian Release: 5.0.4
  APT prefers oldstable
  APT policy: (500, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.21.7-2.fc8xen (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

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

timeout recommends no packages.

timeout suggests no packages.

-- no debconf information
Binary files tct-1.11/bin/timeout and tct-1.11-sg/bin/timeout differ
diff -ur tct-1.11/src/misc/timeout.c tct-1.11-sg/src/misc/timeout.c
--- tct-1.11/src/misc/timeout.c	2001-09-09 17:46:10.000000000 -0400
+++ tct-1.11-sg/src/misc/timeout.c	2011-08-24 17:27:22.000000000 -0400
@@ -30,6 +30,7 @@
 /* System libraries. */
 
 #include <sys/types.h>
+#include <sys/wait.h>
 #include <signal.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -103,6 +104,6 @@
 	alarm(time_to_run);
 	while ((pid = wait(&status)) != -1 && pid != child_pid)
 	     /* void */ ;
-	return (pid == child_pid ? status : -1);
+	return (pid == child_pid ? WEXITSTATUS(status) | WTERMSIG(status) : -1);
     }
 }

--- End Message ---
--- Begin Message ---
Version: 1.19-1

Some (long) time ago you filed this bug against the timeout package.
In the meantime the package has been removed and a timeout command is 
included in the coreutils package.

If the issue you encountered is also applicable to timeout from 
coreutils (as released with Debian 7.0 wheezy or later) the maintainers 
would very much appreciate a fresh report using

    reportbug /usr/bin/timeout

(you should also mention the number of this bug if you think it contains 
valuable information).

Please note that further information sent to this bug is likely to 
remain unread, because the bug is currently not assigned to any existing 
package.


Thank you for taking time to report bugs found in Debian packages.

Kind regards,
Andrei (with no relation to timeout, tct or coreutils maintenance)

--- End Message ---

Reply via email to