GNU bug report logs - #13535
timeout command not working when SIGALRM blocked

Previous Next

Package: coreutils;

Reported by: Stephan Krempel <krempel <at> par-tec.com>

Date: Wed, 23 Jan 2013 17:58:01 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13535 in the body.
You can then email your comments to 13535 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#13535; Package coreutils. (Wed, 23 Jan 2013 17:58:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephan Krempel <krempel <at> par-tec.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Wed, 23 Jan 2013 17:58:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stephan Krempel <krempel <at> par-tec.com>
To: bug-coreutils <at> gnu.org
Subject: timeout command not working when SIGALRM blocked
Date: Wed, 23 Jan 2013 18:44:49 +0100
[Message part 1 (text/plain, inline)]
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).

If this is intended behavior, I would suggest to document it explicitly
to prevent people from tapping into the same pitfall that I hit.

Greetings
Stephan

[blocksigalrm.pl (application/x-perl, attachment)]
[unblock_sigalrm.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, attachment)]

Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Fri, 25 Jan 2013 03:13:02 GMT) Full text and rfc822 format available.

Notification sent to Stephan Krempel <krempel <at> par-tec.com>:
bug acknowledged by developer. (Fri, 25 Jan 2013 03:13:02 GMT) Full text and rfc822 format available.

Message #10 received at 13535-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Stephan Krempel <krempel <at> par-tec.com>
Cc: 13535-done <at> debbugs.gnu.org
Subject: Re: bug#13535: timeout command not working when SIGALRM blocked
Date: Fri, 25 Jan 2013 03:12:24 +0000
[Message part 1 (text/plain, inline)]
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 (text/x-patch, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#13535; Package coreutils. (Fri, 25 Jan 2013 07:45:01 GMT) Full text and rfc822 format available.

Message #13 received at 13535 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: 13535 <at> debbugs.gnu.org, P <at> draigBrady.com, krempel <at> par-tec.com
Subject: Re: bug#13535: timeout command not working when SIGALRM blocked
Date: Fri, 25 Jan 2013 08:43:45 +0100
On 01/25/2013 04:12 AM, Pádraig Brady wrote:
> I agree with your patch, and have attached an updated version.

+1 if you mention http://bugs.gnu.org/13535.

Have a nice day,
Berny





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 22 Feb 2013 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 74 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.