From 84859fd2d22de75d360ef5b875d1ed5e25df02fb Mon Sep 17 00:00:00 2001 From: normal Date: Sun, 26 Aug 2018 04:29:11 +0000 Subject: [PATCH] process.c: remove worthless waitpid_sys macro It is identical to do_waitpid, and the win32 version will not be needed for MJIT (since win32 does not suffer from the waitpid(-1, ...) conflict where waits can get stolen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- process.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/process.c b/process.c index 26db04a4fb..ea72e54321 100644 --- a/process.c +++ b/process.c @@ -995,8 +995,6 @@ waitpid_notify(struct waitpid_state *w, rb_pid_t ret) } } -# define waitpid_sys(pid,status,options) do_waitpid((pid),(status),(options)) - extern volatile unsigned int ruby_nocldwait; /* signal.c */ /* called by timer thread or thread which acquired sigwait_fd */ static void @@ -1005,12 +1003,7 @@ waitpid_each(struct list_head *head) struct waitpid_state *w = 0, *next; list_for_each_safe(head, w, next, wnode) { - rb_pid_t ret; - - if (w->ec) - ret = do_waitpid(w->pid, &w->status, w->options | WNOHANG); - else - ret = waitpid_sys(w->pid, &w->status, w->options | WNOHANG); + rb_pid_t ret = do_waitpid(w->pid, &w->status, w->options | WNOHANG); if (!ret) continue; if (ret == -1) w->errnum = errno;