Skip to content

Commit 98b8e7e

Browse files
committed
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_6@22412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 8c6b78c commit 98b8e7e

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Wed Feb 18 22:23:44 2009 NAKAMURA Usaku <usa@ruby-lang.org>
2+
3+
* win32/win32.c (waitpid): fix bug of checking child slot.
4+
5+
* win32/win32.c (FindChildSlotByHandle): new.
6+
17
Wed Feb 18 22:12:24 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
28

39
* pack.c (pack_pack): propagate taint status from format string to

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define RUBY_RELEASE_DATE "2009-02-18"
33
#define RUBY_VERSION_CODE 186
44
#define RUBY_RELEASE_CODE 20090218
5-
#define RUBY_PATCHLEVEL 339
5+
#define RUBY_PATCHLEVEL 340
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8

win32/win32.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,18 @@ FindChildSlot(rb_pid_t pid)
520520
return NULL;
521521
}
522522

523+
static struct ChildRecord *
524+
FindChildSlotByHandle(HANDLE h)
525+
{
526+
527+
FOREACH_CHILD(child) {
528+
if (child->hProcess == h) {
529+
return child;
530+
}
531+
} END_FOREACH_CHILD;
532+
return NULL;
533+
}
534+
523535
static void
524536
CloseChildHandle(struct ChildRecord *child)
525537
{
@@ -2784,7 +2796,7 @@ waitpid(rb_pid_t pid, int *stat_loc, int options)
27842796
return -1;
27852797
}
27862798

2787-
return poll_child_status(ChildRecord + ret, stat_loc);
2799+
return poll_child_status(FindChildSlotByHandle(events[ret]), stat_loc);
27882800
}
27892801
else {
27902802
struct ChildRecord* child = FindChildSlot(pid);

0 commit comments

Comments
 (0)