aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-03-27 22:20:22 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-03-27 22:20:22 +0300
commitfc1454f587b5bd7ad7df3c097cd30bcedc735e13 (patch)
tree53e29f46fa833ce140aa1c558ebc713ffbe75703 /main.c
parent484169d2d39248d5d2d026902fd45ee8067f8986 (diff)
parent374ad65e52cb612340b460340b0b858a7577374d (diff)
downloadegawk-fc1454f587b5bd7ad7df3c097cd30bcedc735e13.tar.gz
egawk-fc1454f587b5bd7ad7df3c097cd30bcedc735e13.tar.bz2
egawk-fc1454f587b5bd7ad7df3c097cd30bcedc735e13.zip
Merge branch 'master' into feature/stringfix
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/main.c b/main.c
index 73e63448..530d37fd 100644
--- a/main.c
+++ b/main.c
@@ -628,14 +628,14 @@ By default it reads standard input and writes standard output.\n\n"), fp);
if (ferror(fp)) {
/* don't warn about stdout/stderr if EPIPE, but do error exit */
- if (errno != EPIPE) {
- if (fp == stdout)
- warning(_("error writing standard output (%s)"), strerror(errno));
- else if (fp == stderr)
- warning(_("error writing standard error (%s)"), strerror(errno));
- } else if (errno == SIGPIPE)
+ if (errno == EPIPE)
die_via_sigpipe();
+ if (fp == stdout)
+ warning(_("error writing standard output (%s)"), strerror(errno));
+ else if (fp == stderr)
+ warning(_("error writing standard error (%s)"), strerror(errno));
+
// some other problem than SIGPIPE
exit(EXIT_FAILURE);
}