diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | builtin.c | 5 |
2 files changed, 10 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2013-10-31 Arnold D. Robbins <arnold@skeeve.com> + + * builtin.c (efwrite): If write error to stdout is EPIPE, + die silently. Thanks to Hermann Peifer for helping find this. + 2013-10-22 Arnold D. Robbins <arnold@skeeve.com> Revise error messages when writing to standard output or standard @@ -125,6 +125,11 @@ efwrite(const void *ptr, return; wrerror: + /* die silently on EPIPE to stdout */ + if (fp == stdout && errno == EPIPE) + gawk_exit(EXIT_FATAL); + + /* otherwise die verbosely */ fatal(_("%s to \"%s\" failed (%s)"), from, rp ? rp->value : _("standard output"), errno ? strerror(errno) : _("reason unknown")); |