diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-03-27 22:19:07 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-03-27 22:19:07 +0300 |
commit | 374ad65e52cb612340b460340b0b858a7577374d (patch) | |
tree | e0ffb5dbf023363f6932e0fa680a9e0aacade364 | |
parent | 5b7042ea0a68d41c4fbd0d6228f77975ebf8c38b (diff) | |
download | egawk-374ad65e52cb612340b460340b0b858a7577374d.tar.gz egawk-374ad65e52cb612340b460340b0b858a7577374d.tar.bz2 egawk-374ad65e52cb612340b460340b0b858a7577374d.zip |
Minor cleanup in main.c:usage.
-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); } |