summaryrefslogtreecommitdiff
path: root/src/tee.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-04-20 15:10:07 +0000
committerJim Meyering <jim@meyering.net>2004-04-20 15:10:07 +0000
commitd432ccecc89a8f9dcb27a2d3c4b982d776e34152 (patch)
tree34d569c94311fbb5929949c8df02a4a15df2541f /src/tee.c
parent7b6892c3dfd51e3bc34b7223100f8ad22d5f1ace (diff)
downloadcoreutils-d432ccecc89a8f9dcb27a2d3c4b982d776e34152.tar.xz
(main) [!defined _POSIX_SOURCE]:
Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent.
Diffstat (limited to 'src/tee.c')
-rw-r--r--src/tee.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/tee.c b/src/tee.c
index 586753962..8e2d4bcba 100644
--- a/src/tee.c
+++ b/src/tee.c
@@ -115,33 +115,11 @@ main (int argc, char **argv)
}
if (ignore_interrupts)
- {
-#ifdef _POSIX_SOURCE
- struct sigaction sigact;
-
- sigact.sa_handler = SIG_IGN;
- sigemptyset (&sigact.sa_mask);
- sigact.sa_flags = 0;
- sigaction (SIGINT, &sigact, NULL);
-#else /* !_POSIX_SOURCE */
- signal (SIGINT, SIG_IGN);
-#endif /* _POSIX_SOURCE */
- }
+ signal (SIGINT, SIG_IGN);
/* Don't let us be killed if one of the output files is a pipe that
doesn't consume all its input. */
-#ifdef _POSIX_SOURCE
- {
- struct sigaction sigact;
-
- sigact.sa_handler = SIG_IGN;
- sigemptyset (&sigact.sa_mask);
- sigact.sa_flags = 0;
- sigaction (SIGPIPE, &sigact, NULL);
- }
-#else
signal (SIGPIPE, SIG_IGN);
-#endif
/* Do *not* warn if tee is given no file arguments.
POSIX requires that it work when given no arguments. */