aboutsummaryrefslogtreecommitdiff
path: root/coreutils/dd.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/dd.c')
-rw-r--r--coreutils/dd.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 961b1fff7..f3330e624 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -121,9 +121,6 @@ int dd_main(int argc, char **argv)
121 off_t count; 121 off_t count;
122 off_t seek, skip; 122 off_t seek, skip;
123 const char *infile, *outfile; 123 const char *infile, *outfile;
124#if ENABLE_FEATURE_DD_SIGNAL_HANDLING
125 struct sigaction sigact;
126#endif
127 } Z; 124 } Z;
128#define flags (Z.flags ) 125#define flags (Z.flags )
129#define oc (Z.oc ) 126#define oc (Z.oc )
@@ -132,17 +129,13 @@ int dd_main(int argc, char **argv)
132#define skip (Z.skip ) 129#define skip (Z.skip )
133#define infile (Z.infile ) 130#define infile (Z.infile )
134#define outfile (Z.outfile) 131#define outfile (Z.outfile)
135#define sigact (Z.sigact )
136 132
137 memset(&Z, 0, sizeof(Z)); 133 memset(&Z, 0, sizeof(Z));
138 INIT_G(); 134 INIT_G();
139 //fflush(NULL); - is this needed because of NOEXEC? 135 //fflush(NULL); - is this needed because of NOEXEC?
140 136
141#if ENABLE_FEATURE_DD_SIGNAL_HANDLING 137#if ENABLE_FEATURE_DD_SIGNAL_HANDLING
142 sigact.sa_handler = dd_output_status; 138 signal_SA_RESTART_empty_mask(SIGUSR1, dd_output_status);
143 sigact.sa_flags = SA_RESTART;
144 /*sigemptyset(&sigact.sa_mask); - memset did it */
145 sigaction(SIGUSR1, &sigact, NULL);
146#endif 139#endif
147 140
148 for (n = 1; n < argc; n++) { 141 for (n = 1; n < argc; n++) {