summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-26 18:17:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-26 18:17:43 +0000
commit4d1450fc96fdf80ebac183ce920e61aa392e05e5 (patch)
treed03343e2fdb82b6b2152013ce31ce2b2471f85cc /process.c
parent55f7f3dd3c9569a33589e481cae8d727cafa60e5 (diff)
* process.c (rb_waitpid): no needs to poll. [ruby-dev:31871]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/process.c b/process.c
index 5bceb2be64..0bdcb426e2 100644
--- a/process.c
+++ b/process.c
@@ -605,7 +605,6 @@ rb_waitpid(rb_pid_t pid, int *st, int flags)
arg.pid = pid;
arg.st = st;
arg.flags = flags;
- retry:
result = (rb_pid_t)rb_thread_blocking_region(rb_waitpid_blocking, &arg,
RB_UBF_DFL, 0);
if (result < 0) {
@@ -617,10 +616,6 @@ rb_waitpid(rb_pid_t pid, int *st, int flags)
#endif
return -1;
}
- if (result == 0) {
- rb_thread_polling();
- goto retry;
- }
#else /* NO_WAITPID */
if (pid_tbl && st_lookup(pid_tbl, pid, (st_data_t *)st)) {
rb_last_status_set(*st, pid);
@@ -861,7 +856,7 @@ proc_waitall(void)
static VALUE
detach_process_watcher(void *arg)
{
- rb_pid_t cpid, pid = (rb_pid_t)arg;
+ rb_pid_t cpid, pid = (rb_pid_t)(VALUE)arg;
int status;
while ((cpid = rb_waitpid(pid, &status, 0)) == 0) {
@@ -873,7 +868,7 @@ detach_process_watcher(void *arg)
VALUE
rb_detach_process(rb_pid_t pid)
{
- return rb_thread_create(detach_process_watcher, (void*)pid);
+ return rb_thread_create(detach_process_watcher, (void*)(VALUE)pid);
}