* win32/win32.c (waitpid): fix wait count.

* win32/win32.c (poll_child_status): rename from wait_child().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2001-11-13 16:14:42 +00:00
Родитель fffeb61121
Коммит d51279d862
2 изменённых файлов: 11 добавлений и 5 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Wed Nov 14 01:12:07 2001 Usaku Nakamura <usa@ruby-lang.org>
* win32/win32.c (waitpid): fix wait count.
* win32/win32.c (poll_child_status): rename from wait_child().
Tue Nov 13 19:50:30 2001 WATANABE Hirofumi <eban@ruby-lang.org>
* configure.in: do not override CC if set.

Просмотреть файл

@ -2270,7 +2270,7 @@ void setservent (int stayopen) {}
#endif
static pid_t
wait_child(struct ChildRecord *child, int *stat_loc, DWORD timeout)
poll_child_status(struct ChildRecord *child, int *stat_loc)
{
DWORD exitcode;
@ -2311,7 +2311,7 @@ waitpid (pid_t pid, int *stat_loc, int options)
FOREACH_CHILD(child) {
if (!child->pid || child->pid < 0) continue;
if ((pid = wait_child(child, stat_loc, 0))) return pid;
if ((pid = poll_child_status(child, stat_loc))) return pid;
events[count++] = child->hProcess;
} END_FOREACH_CHILD;
if (!count) {
@ -2320,7 +2320,7 @@ waitpid (pid_t pid, int *stat_loc, int options)
}
events[count] = interrupted_event;
ret = WaitForMultipleEvents(count, events, FALSE, timeout, TRUE);
ret = WaitForMultipleEvents(count + 1, events, FALSE, timeout, TRUE);
if (ret == WAIT_TIMEOUT) return 0;
if ((ret -= WAIT_OBJECT_0) == count) {
ResetSignal(interrupted_event);
@ -2332,7 +2332,7 @@ waitpid (pid_t pid, int *stat_loc, int options)
return -1;
}
return wait_child(ChildRecord + ret, stat_loc, 0);
return poll_child_status(ChildRecord + ret, stat_loc);
}
else {
struct ChildRecord* child = FindChildSlot(pid);
@ -2341,7 +2341,7 @@ waitpid (pid_t pid, int *stat_loc, int options)
return -1;
}
while (!(pid = wait_child(child, stat_loc, timeout))) {
while (!(pid = poll_child_status(child, stat_loc))) {
/* wait... */
if (wait_events(child->hProcess, timeout) != WAIT_OBJECT_0) {
/* still active */