[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13535: timeout command not working when SIGALRM blocked
From: |
Pádraig Brady |
Subject: |
bug#13535: timeout command not working when SIGALRM blocked |
Date: |
Fri, 25 Jan 2013 03:12:24 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
On 01/23/2013 05:44 PM, Stephan Krempel wrote:
Hi there,
If the calling process has SIGALRM blocked, timeout simply never times out.
Find attached a small program to demonstrate the problem and a patch to
fix it by unblocking the necessary signal (at least on x86/linux).
The sigprocmask gnulib module is used if the sigaction
module is needed, so we should be able to use sigprocmask
unconditionally here. There is even an implementation
for windows included if needed.
If this is intended behavior, I would suggest to document it explicitly
to prevent people from tapping into the same pitfall that I hit.
I agree with your patch, and have attached an updated version.
Hmm I suppose we should also do this for SIGCHLD as a follow on from:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=73d46261
thanks,
Pádraig.
timeout-block-alrm.patch
Description: Text Data