mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 22:45:03 +02:00
* 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_9_1@20517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bd9befd99e
commit
d291c56e63
2 changed files with 19 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Thu Dec 4 23:31:12 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* win32/win32.c (waitpid): fix bug of checking child slot.
|
||||||
|
|
||||||
|
* win32/win32.c (FindChildSlotByHandle): new.
|
||||||
|
|
||||||
Thu Dec 4 16:58:12 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Thu Dec 4 16:58:12 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* lib/rubygems/validator.rb (Gem#remove_leading_dot_dir): make
|
* lib/rubygems/validator.rb (Gem#remove_leading_dot_dir): make
|
||||||
|
|
|
@ -533,6 +533,18 @@ FindChildSlot(rb_pid_t pid)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct ChildRecord *
|
||||||
|
FindChildSlotByHandle(HANDLE h)
|
||||||
|
{
|
||||||
|
|
||||||
|
FOREACH_CHILD(child) {
|
||||||
|
if (child->hProcess == h) {
|
||||||
|
return child;
|
||||||
|
}
|
||||||
|
} END_FOREACH_CHILD;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
CloseChildHandle(struct ChildRecord *child)
|
CloseChildHandle(struct ChildRecord *child)
|
||||||
{
|
{
|
||||||
|
@ -3062,7 +3074,7 @@ waitpid(rb_pid_t pid, int *stat_loc, int options)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return poll_child_status(ChildRecord + ret, stat_loc);
|
return poll_child_status(FindChildSlotByHandle(events[ret]), stat_loc);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
struct ChildRecord* child = FindChildSlot(pid);
|
struct ChildRecord* child = FindChildSlot(pid);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue