diff options
author | Pádraig Brady <P@draigBrady.com> | 2009-08-13 14:37:43 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2009-08-13 16:06:50 +0100 |
commit | e4caea57759495847dc52f7a7d062500dd711a96 (patch) | |
tree | 179db10a2fd92ba9954dd5c41391c5f2ce038956 | |
parent | ab274c428dbdb36b87c37b0045e8e6dc3585f04a (diff) | |
download | coreutils-e4caea57759495847dc52f7a7d062500dd711a96.tar.xz |
dd: fix a signal handling race
* src/dd.c (main): Install the signal handlers at startup
rather than just before the copy starts. In this way signals
received before the copy (like during a slow truncate for e.g.)
will be deferred and handled consistently.
* THANKS: Add Bernhard's email address.
* NEWS: Mention the fix.
Reported by Bernhard Voelker.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | src/dd.c | 4 |
3 files changed, 6 insertions, 2 deletions
@@ -7,6 +7,9 @@ GNU coreutils NEWS -*- outline -*- dd's oflag=direct option now works even when the size of the input is not a multiple of e.g., 512 bytes. + dd now handles signals consistently even when they're received + before data copying has started. + install runs faster again with SELinux enabled [introduced in coreutils-7.0] @@ -75,6 +75,7 @@ Bernd Melchers melchers@cis.fu-berlin.de Bernhard Baehr bernhard.baehr@gmx.de Bernhard Gabler bernhard@uni-koblenz.de Bernhard Rosenkraenzer bero@redhat.de +Bernhard Voelker bernhard.voelker@siemens-enterprise.com Bert Deknuydt Bert.Deknuydt@esat.kuleuven.ac.be Bert Wesarg bert.wesarg@googlemail.com Bill Peters peters@gaffel.as.arizona.edu @@ -1828,6 +1828,8 @@ main (int argc, char **argv) int exit_status; off_t offset; + install_signal_handlers (); + initialize_main (&argc, &argv); set_program_name (argv[0]); setlocale (LC_ALL, ""); @@ -1928,8 +1930,6 @@ main (int argc, char **argv) } } - install_signal_handlers (); - start_time = gethrxtime (); exit_status = dd_copy (); |