diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-03-27 22:19:59 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-03-27 22:19:59 +0300 |
commit | 3e6b928e9a840efe0a98dda193e78719f337e27d (patch) | |
tree | cef624f17cbff33b1d94cb159584e232446b3a1e | |
parent | 71649092611573639e39f95b7ca148a98b759242 (diff) | |
parent | 374ad65e52cb612340b460340b0b858a7577374d (diff) | |
download | egawk-3e6b928e9a840efe0a98dda193e78719f337e27d.tar.gz egawk-3e6b928e9a840efe0a98dda193e78719f337e27d.tar.bz2 egawk-3e6b928e9a840efe0a98dda193e78719f337e27d.zip |
Merge branch 'master' into feature/fix-comments
-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); } |