CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
gawk: added forgotten pipe.patch
authorVictor Martinez <pitillo@ono.com>
Mon, 29 Sep 2014 17:55:51 +0000 (17:55 +0000)
committerVictor Martinez <pitillo@ono.com>
Mon, 29 Sep 2014 17:55:51 +0000 (17:55 +0000)
gawk/pipe.patch [new file with mode: 0644]

diff --git a/gawk/pipe.patch b/gawk/pipe.patch
new file mode 100644 (file)
index 0000000..27ea2d3
--- /dev/null
@@ -0,0 +1,20 @@
+diff --git a/io.c b/io.c
+index a6e786f..2bb8f28 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);
+       }