[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dd SIGUSR1 race
From: |
Pádraig Brady |
Subject: |
dd SIGUSR1 race |
Date: |
Mon, 22 Sep 2014 16:25:58 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
There is a race with dd setting up the signal handler for SIGUSR1,
and some async process sending it. If dd loses the race it's killed.
This was pointed out to me by Federico (CC'd). The race was addressed,
but only narrowed with:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=e4caea5
I was wondering about making things more general by allowing
the parent process to set SIGUSR1 to SIGIGN, and dd would still
setup the signal handler in this case. This isn't too much of
a stretch I think as it would only possibly result in unwanted
output to stderr (and dd is already quite noisy to stderr by default),
rather than unwanted process termination.
Though doing the above would still need existing apps to change
(to ignore SIGUSR1), so instead it might be better to just support
a simpler mechanism through something like a "status=progress" option,
which would avoid the general issues and awkwardness of signals as mentioned
here:
http://lists.gnu.org/archive/html/bug-coreutils/2004-04/threads.html#00127
I'm leaning towards the latter option here.
thanks,
Pádraig.
- dd SIGUSR1 race,
Pádraig Brady <=
- Re: dd SIGUSR1 race, Federico Simoncelli, 2014/09/25
- Re: dd SIGUSR1 race, Pádraig Brady, 2014/09/25
- Re: dd SIGUSR1 race, Bernhard Voelker, 2014/09/26
- Re: dd SIGUSR1 race, Pádraig Brady, 2014/09/26
- Re: dd SIGUSR1 race, Pádraig Brady, 2014/09/26
- Re: dd SIGUSR1 race, Federico Simoncelli, 2014/09/26
- Re: dd SIGUSR1 race, Pádraig Brady, 2014/09/26
- Re: dd SIGUSR1 race, Federico Simoncelli, 2014/09/26
- Re: dd SIGUSR1 race, Pádraig Brady, 2014/09/29
- Re: dd SIGUSR1 race, Bernhard Voelker, 2014/09/29