aboutsummaryrefslogtreecommitdiffstats
path: root/interpret.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-06-17 21:53:31 +0300
committerArnold D. Robbins <arnold@skeeve.com>2018-06-17 21:53:31 +0300
commitf59bc1d895b5cc3d0dfad1ced3fc998ba5f7e976 (patch)
treeb25948242fc9b7a7188280b2fa883b19a5354324 /interpret.h
parent11d1cd05ef84f8dedf79020128ffcb8a9764f3b8 (diff)
parent7f57d12c835729207aea12e22021efce1705e6a0 (diff)
downloadegawk-f59bc1d895b5cc3d0dfad1ced3fc998ba5f7e976.tar.gz
egawk-f59bc1d895b5cc3d0dfad1ced3fc998ba5f7e976.tar.bz2
egawk-f59bc1d895b5cc3d0dfad1ced3fc998ba5f7e976.zip
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'interpret.h')
-rw-r--r--interpret.h6
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;