Subject: Re: bug#25624: [PATCH] timeout: Fix signal race in SIGALRM handling

From: Pádraig Brady <[email-masked]>
Date: Thu, 9 Feb 2017 22:15:05 -0800

On 09/02/17 21:39, Pádraig Brady wrote:
> That looks good.
> 
> I've changed the naming a bit,
> ensured we also block the term_signal,
> made the build of timeout optional on sigsuspend availability,
> adjusted the commit message,
> and added a NEWS entry.
> 
> Marking this as done now.
> 
> I'll push in your name later.

Actually to ensure we indicate when the monitored
command was terminated with a signal, we need to
unblock that signal as follows.  I'll merge that in too.

diff --git a/src/timeout.c b/src/timeout.c
index d5a90fd..6fe0542 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -516,6 +516,7 @@ main (int argc, char **argv)
                 {
                   /* exit with the signal flag set.  */
                   signal (sig, SIG_DFL);
+                  unblock_signal (sig);
                   raise (sig);
                 }
               status = sig + 128; /* what sh returns for signaled processes.  *