diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-06-17 21:53:04 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-06-17 21:53:04 +0300 |
commit | 7f57d12c835729207aea12e22021efce1705e6a0 (patch) | |
tree | d218d51151c96bd671dd6797462ff9fa6d1ea362 /interpret.h | |
parent | 1e80e4d9f9bb3df825fe93e807f4045e1d07eac8 (diff) | |
parent | edaf82c330629586b1158a3dec407d53084b02e3 (diff) | |
download | egawk-7f57d12c835729207aea12e22021efce1705e6a0.tar.gz egawk-7f57d12c835729207aea12e22021efce1705e6a0.tar.bz2 egawk-7f57d12c835729207aea12e22021efce1705e6a0.zip |
Merge branch 'gawk-4.2-stable'
Diffstat (limited to 'interpret.h')
-rw-r--r-- | interpret.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/interpret.h b/interpret.h index 20fcb7ad..8408a532 100644 --- a/interpret.h +++ b/interpret.h @@ -110,6 +110,7 @@ top: case Op_atexit: { bool stdio_problem = false; + bool got_EPIPE = false; /* avoid false source indications */ source = NULL; @@ -125,7 +126,7 @@ top: * and pipes, in that it doesn't affect their exit status. * So we no longer do either. */ - (void) close_io(& stdio_problem); + (void) close_io(& stdio_problem, & got_EPIPE); /* * However, we do want to exit non-zero if there was a problem * with stdout/stderr, so we reinstate a slightly different @@ -135,6 +136,9 @@ top: exit_val = 1; close_extensions(); + + if (got_EPIPE) + die_via_sigpipe(); } break; |