aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-27 10:09:33 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-27 10:09:33 +0000
commitc46cac9f50b32306d2e1d411c03cc37657aa5d40 (patch)
treedcaaf733121369149883e957766260c1fdc2a0af /process.c
parentc32e7317530cbec84b968af437b92ff2ff9e1622 (diff)
downloadruby-c46cac9f50b32306d2e1d411c03cc37657aa5d40.tar.gz
process.c (waitpid_wait): do not set ECHILD prematurely
It is possible to have both MJIT and normal child processes alive, so we cannot set ECHILD based on such a guess. We can still elide waitpid(PID <= 0) calls if we have callers in vm->waiting_pids, however. For specs, ensure Process.waitall does not leak MJIT PIDs to Rubyspace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/process.c b/process.c
index dbdcade71a..69b6632955 100644
--- a/process.c
+++ b/process.c
@@ -1074,12 +1074,6 @@ waitpid_wait(struct waitpid_state *w)
}
else if (w->options & WNOHANG) {
w->cond = 0;
-
- /* MJIT must be waiting, but don't tell Ruby callers about it */
- if (w->pid < 0 && !list_empty(&vm->waiting_pids)) {
- w->ret = -1;
- w->errnum = ECHILD;
- }
}
else {
w->cond = rb_sleep_cond_get(w->ec);