diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-03-27 20:30:14 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-03-27 20:30:14 +0300 |
commit | 5b7042ea0a68d41c4fbd0d6228f77975ebf8c38b (patch) | |
tree | ffd5fa8aecdcc0ef3c6c5043c10b0335d4e59435 /main.c | |
parent | 45099c6ece4f4e91f0d525d10a6d4d162d30e6e4 (diff) | |
download | egawk-5b7042ea0a68d41c4fbd0d6228f77975ebf8c38b.tar.gz egawk-5b7042ea0a68d41c4fbd0d6228f77975ebf8c38b.tar.bz2 egawk-5b7042ea0a68d41c4fbd0d6228f77975ebf8c38b.zip |
Die with SIGPIPE when EPIPE happens on stdout.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -633,7 +633,10 @@ By default it reads standard input and writes standard output.\n\n"), fp); warning(_("error writing standard output (%s)"), strerror(errno)); else if (fp == stderr) warning(_("error writing standard error (%s)"), strerror(errno)); - } + } else if (errno == SIGPIPE) + die_via_sigpipe(); + + // some other problem than SIGPIPE exit(EXIT_FAILURE); } |