[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dd SIGUSR1 race
From: |
Bernhard Voelker |
Subject: |
Re: dd SIGUSR1 race |
Date: |
Fri, 26 Sep 2014 22:58:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 |
On 09/26/2014 05:05 PM, Pádraig Brady wrote:
Subject: [PATCH] dd: use more robust SIGUSR handling
s/USR/USR1/
* src/dd.c (ifd_reopen): A new wrapper to ensure we
don't exit upon receiving a SIGUSR1 in a blocking open()
on a fifo for example.
(iread): Process signals also after a short read.
(install_signal_handlers): Install SIGINFO/SIGUSR1 handler
even if set to SIG_IGN, as this is what the parent can easily
set from a shell script that can send SIGUSR1 without the
possiblity of inadvertently killing the dd process.
* doc/corutils.texi (dd invocation): Improve the example to
show robust usage wrt signal races and short reads.
* tests/dd/stats.sh: A new test for various signal races.
* tests/local.mk: Reference the new test.
* NEWS: Mention the fix.
Another minor nit:
s/corutils/coreutils/
The rest LGTM.
What about adding "trap '' USR1;" to usage(), too?
You know, many folks are only reading that instead of the
texinfo manual.
OTOH, that stats-on-signal feature is such a detail that it may
be worth removing from the manpage at all.
Thanks & have a nice day,
Berny
- Re: dd SIGUSR1 race, (continued)
- 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
- Re: dd SIGUSR1 race, Pádraig Brady, 2014/09/29
- Re: dd SIGUSR1 race, Pádraig Brady, 2014/09/30
- Re: dd SIGUSR1 race, Federico Simoncelli, 2014/09/30
- Re: dd SIGUSR1 race,
Bernhard Voelker <=
- Re: dd SIGUSR1 race, Pádraig Brady, 2014/09/26