diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-03-27 22:20:22 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-03-27 22:20:22 +0300 |
commit | fc1454f587b5bd7ad7df3c097cd30bcedc735e13 (patch) | |
tree | 53e29f46fa833ce140aa1c558ebc713ffbe75703 | |
parent | 484169d2d39248d5d2d026902fd45ee8067f8986 (diff) | |
parent | 374ad65e52cb612340b460340b0b858a7577374d (diff) | |
download | egawk-fc1454f587b5bd7ad7df3c097cd30bcedc735e13.tar.gz egawk-fc1454f587b5bd7ad7df3c097cd30bcedc735e13.tar.bz2 egawk-fc1454f587b5bd7ad7df3c097cd30bcedc735e13.zip |
Merge branch 'master' into feature/stringfix
-rw-r--r-- | main.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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); } |