[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] timeout: Ensure SIGCHLD signal is not blocked
From: |
Thomas Jarosch |
Subject: |
Re: [PATCH] timeout: Ensure SIGCHLD signal is not blocked |
Date: |
Fri, 20 Oct 2017 17:46:53 +0200 |
Hi Tobias,
On Thursday, 19 October 2017 19:42:59 CEST Tobias Stöckmann wrote:
> On 19/10/17 04:45, Pádraig Brady wrote:
> > Isn't there also a small race if SIGCHLD is received
> > after wait() returns but before the sigsuspend() runs?
>
> great catch, that could happen indeed. As you wrote in your other mail,
> this should go in as a separate patch as it fixes another issue my
> original patch tried to address.
>
> The one reported by Thomas is an actually introduced regression, sorry
> for that.
no worries about the regression, such stuff happens all the time.
It took several hours to track down the issue because every time I
ran timeout(1) via strace, it worked just fine. After a lot of printf
debugging in timeout(1) I found out what was going on.
Before switching to timeout(1), we had an similar implementation called
"exec_timeout". It suffers from the same race condition that you fixed ;)
Another good point for having timeout(1) in coreutils.
Cheers,
Thomas