aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-04-25 13:22:29 +0300
committerArnold D. Robbins <arnold@skeeve.com>2014-04-25 13:22:29 +0300
commit567f771431686847499354999fd141b6118e8a54 (patch)
tree87c90c42d4538b5fda470e347434e44a5e9daf7a /io.c
parent07fb211522418f8537c24b28dc1ec79da0044658 (diff)
parent19564e696aca506a14ceb4a08aa2b7c7988a2473 (diff)
downloadegawk-567f771431686847499354999fd141b6118e8a54.tar.gz
egawk-567f771431686847499354999fd141b6118e8a54.tar.bz2
egawk-567f771431686847499354999fd141b6118e8a54.zip
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io.c b/io.c
index a6e786f7..2bb8f28a 100644
--- a/io.c
+++ b/io.c
@@ -2078,6 +2078,7 @@ use_pipes:
|| close(ctop[0]) == -1 || close(ctop[1]) == -1)
fatal(_("close of pipe failed (%s)"), strerror(errno));
/* stderr does NOT get dup'ed onto child's stdout */
+ signal(SIGPIPE, SIG_DFL);
execl("/bin/sh", "sh", "-c", str, NULL);
_exit(errno == ENOENT ? 127 : 126);
}
@@ -2271,6 +2272,7 @@ gawk_popen(const char *cmd, struct redirect *rp)
fatal(_("moving pipe to stdout in child failed (dup: %s)"), strerror(errno));
if (close(p[0]) == -1 || close(p[1]) == -1)
fatal(_("close of pipe failed (%s)"), strerror(errno));
+ signal(SIGPIPE, SIG_DFL);
execl("/bin/sh", "sh", "-c", cmd, NULL);
_exit(errno == ENOENT ? 127 : 126);
}