aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-03-20 21:15:03 +0200
committerArnold D. Robbins <arnold@skeeve.com>2017-03-20 21:15:03 +0200
commit7ec5068a7419cc4dddcf7e060077a1287217c5cd (patch)
tree9369b5591ddb5f0a48421b1b82abd4b02674195b /main.c
parentde684770acc545bf14f85655d44fe91e9afa0ba3 (diff)
downloadegawk-7ec5068a7419cc4dddcf7e060077a1287217c5cd.tar.gz
egawk-7ec5068a7419cc4dddcf7e060077a1287217c5cd.tar.bz2
egawk-7ec5068a7419cc4dddcf7e060077a1287217c5cd.zip
Improve handling of EPIPE and fflush.
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main.c b/main.c
index 56482f51..4f578d3e 100644
--- a/main.c
+++ b/main.c
@@ -255,7 +255,7 @@ main(int argc, char **argv)
#ifdef SIGBUS
(void) signal(SIGBUS, catchsig);
#endif
-#ifdef SIGPIPE
+
/*
* Ignore SIGPIPE so that writes to pipes that fail don't
* kill the process but instead return -1 and set errno.
@@ -269,8 +269,7 @@ main(int argc, char **argv)
* should not give us "broken pipe" messages --- mainly because
* it did not do so in the past and people would complain.
*/
- signal(SIGPIPE, SIG_IGN);
-#endif
+ ignore_sigpipe();
(void) sigsegv_install_handler(catchsegv);
#define STACK_SIZE (16*1024)