timeout package's timeout command not exiting with the exit status of the command it ran

skar skar.karthikeyan at gmail.com
Thu Nov 19 08:04:22 UTC 2009


Hi,

Timeout package's timeout command not exiting with the exit status of 
the command it ran.

The relevant code in tct-1.11/src/misc/timeout.c is:

>
> while ((pid = wait(&status)) != -1 && pid != child_pid)
>              /* void */ ;
> return (pid == child_pid ? status : -1);
It should actually be:

> while ((pid = wait(&status)) != -1 && pid != child_pid)
>              /* void */ ;
> return (pid == child_pid ? status>>8: -1);
Since the lower 8 bits give the signal received by the child, they 
aren't needed.

I'd be thankful if some one could fix this and update the ubuntu package :)

cheers,
skar.

-- 
--
The life so short, the craft so long to learn. 





More information about the ubuntu-users mailing list