[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, select, updated. gawk-4.1.0-1060-g0d867a
From: |
Andrew J. Schorr |
Subject: |
[gawk-diffs] [SCM] gawk branch, select, updated. gawk-4.1.0-1060-g0d867aa |
Date: |
Mon, 05 Jan 2015 17:38:15 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, select has been updated
via 0d867aa42ea8c3487678dcceea484c10c88914cb (commit)
from a29f6a213fb18c199a4b1358327dc6d21f59eb64 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=0d867aa42ea8c3487678dcceea484c10c88914cb
commit 0d867aa42ea8c3487678dcceea484c10c88914cb
Author: Andrew J. Schorr <address@hidden>
Date: Mon Jan 5 12:37:43 2015 -0500
Fix bug in io.c:wait_any where we may not have waited for the requested
child process exit status.
diff --git a/ChangeLog b/ChangeLog
index eb7555f..f0c3dc4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-01-05 Andrew J. Schorr <address@hidden>
+
+ * io.c (wait_any): If the `interesting' argument is non-zero, then we
+ must not return until that child process has exited, since the caller
+ gawk_pclose depends on our returning its exit status. So in that case,
+ do not pass WNOHANG to waitpid.
+
2015-01-04 Andrew J. Schorr <address@hidden>
* gawkapi.h: Fix another comment typo.
diff --git a/io.c b/io.c
index 6e6d1a1..f849f83 100644
--- a/io.c
+++ b/io.c
@@ -2250,7 +2250,12 @@ wait_any(int interesting) /* pid of interest, if
any */
#endif
for (;;) {
# if defined(HAVE_WAITPID) && defined(WNOHANG)
- if ((pid = waitpid(-1, & status, WNOHANG)) == 0)
+ /*
+ * N.B. If the caller wants status for a specific child process
+ * (i.e. interesting is non-zero), then we must hang until we
+ * get exit status for that child.
+ */
+ if ((pid = waitpid(-1, & status, (interesting ? 0 : WNOHANG)))
== 0)
/* No children have exited */
break;
# elif defined(HAVE_SYS_WAIT_H) /* POSIX compatible sys/wait.h */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
io.c | 7 ++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, select, updated. gawk-4.1.0-1060-g0d867aa,
Andrew J. Schorr <=