diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-03-27 22:19:45 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-03-27 22:19:45 +0300 |
commit | e994939fa94a419368b8ac25e51c4607441fb13d (patch) | |
tree | f4ec0b8158f2504440f7c57581c10790a60b8d64 | |
parent | 61b4108f82f30deaabf03eb6dbc0e64edeffdb6e (diff) | |
parent | 374ad65e52cb612340b460340b0b858a7577374d (diff) | |
download | egawk-e994939fa94a419368b8ac25e51c4607441fb13d.tar.gz egawk-e994939fa94a419368b8ac25e51c4607441fb13d.tar.bz2 egawk-e994939fa94a419368b8ac25e51c4607441fb13d.zip |
Merge branch 'master' into feature/api-parser
-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); } |