summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-18 13:24:27 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-18 13:24:27 +0000
commit9d8bb15c5c9f090b28322cde172b1321ea893e22 (patch)
tree201f3df5ae18b8c283855e6138c64fb294a5542b
parenta199dc848e23686938246e333dac3b8eeaf3578f (diff)
merge revision(s) 20537:
* win32/win32.c (waitpid): fix bug of checking child slot. * win32/win32.c (FindChildSlotByHandle): new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@22414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--version.h2
-rw-r--r--win32/win32.c14
3 files changed, 20 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0d9f784550..6f64a7e7b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Feb 18 22:24:23 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (waitpid): fix bug of checking child slot.
+
+ * win32/win32.c (FindChildSlotByHandle): new.
+
Wed Feb 18 22:17:04 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
* pack.c (pack_pack): propagate taint status from format string to
diff --git a/version.h b/version.h
index 9ac5966564..8fb27d9bb5 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2009-02-18"
#define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20090218
-#define RUBY_PATCHLEVEL 125
+#define RUBY_PATCHLEVEL 126
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
diff --git a/win32/win32.c b/win32/win32.c
index 44de047716..abe3949600 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -514,6 +514,18 @@ FindChildSlot(rb_pid_t pid)
return NULL;
}
+static struct ChildRecord *
+FindChildSlotByHandle(HANDLE h)
+{
+
+ FOREACH_CHILD(child) {
+ if (child->hProcess == h) {
+ return child;
+ }
+ } END_FOREACH_CHILD;
+ return NULL;
+}
+
static void
CloseChildHandle(struct ChildRecord *child)
{
@@ -2964,7 +2976,7 @@ waitpid(rb_pid_t pid, int *stat_loc, int options)
return -1;
}
- return poll_child_status(ChildRecord + ret, stat_loc);
+ return poll_child_status(FindChildSlotByHandle(events[ret]), stat_loc);
}
else {
struct ChildRecord* child = FindChildSlot(pid);