diff options
author | Jim Meyering <jim@meyering.net> | 1994-07-03 17:46:37 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-07-03 17:46:37 +0000 |
commit | 792d894bd907cb2538dab605270a84e073f76984 (patch) | |
tree | 6287a820dd6c17d61cf8b1cdb49d6a209b399a04 /src/dd.c | |
parent | 363b712c93b718987517dcaac58a850ade801165 (diff) | |
download | coreutils-792d894bd907cb2538dab605270a84e073f76984.tar.xz |
.
Diffstat (limited to 'src/dd.c')
-rw-r--r-- | src/dd.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -405,9 +405,19 @@ main (argc, argv) sigact.sa_flags = 0; sigaction (SIGINT, &sigact, NULL); } + sigaction (SIGPIPE, NULL, &sigact); + if (sigact.sa_handler != SIG_IGN) + { + sigact.sa_handler = interrupt_handler; + sigemptyset (&sigact.sa_mask); + sigact.sa_flags = 0; + sigaction (SIGPIPE, &sigact, NULL); + } #else /* !_POSIX_VERSION */ if (signal (SIGINT, SIG_IGN) != SIG_IGN) signal (SIGINT, interrupt_handler); + if (signal (SIGPIPE, SIG_IGN) != SIG_IGN) + signal (SIGPIPE, interrupt_handler); #endif /* !_POSIX_VERSION */ copy (); } |