aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-11-13 16:14:42 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-11-13 16:14:42 +0000
commitd51279d8627e069b9308bcfab3933e188a5277fc (patch)
tree5eb3409ad5e3b673711d8fdb2c7eb55b6ba37621
parentfffeb611217ffd16f9aad5d89741f84082ee06d1 (diff)
downloadruby-d51279d8627e069b9308bcfab3933e188a5277fc.tar.gz
* 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
-rw-r--r--ChangeLog6
-rw-r--r--win32/win32.c10
2 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index d790a7cc19..91e4f68274 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/win32/win32.c b/win32/win32.c
index d0531a70d0..4b6f6665a8 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -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 */