mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
32910b8781
commit
84859fd2d2
1 changed files with 1 additions and 8 deletions
|
@ -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 */
|
extern volatile unsigned int ruby_nocldwait; /* signal.c */
|
||||||
/* called by timer thread or thread which acquired sigwait_fd */
|
/* called by timer thread or thread which acquired sigwait_fd */
|
||||||
static void
|
static void
|
||||||
|
@ -1005,12 +1003,7 @@ waitpid_each(struct list_head *head)
|
||||||
struct waitpid_state *w = 0, *next;
|
struct waitpid_state *w = 0, *next;
|
||||||
|
|
||||||
list_for_each_safe(head, w, next, wnode) {
|
list_for_each_safe(head, w, next, wnode) {
|
||||||
rb_pid_t ret;
|
rb_pid_t ret = do_waitpid(w->pid, &w->status, w->options | WNOHANG);
|
||||||
|
|
||||||
if (w->ec)
|
|
||||||
ret = do_waitpid(w->pid, &w->status, w->options | WNOHANG);
|
|
||||||
else
|
|
||||||
ret = waitpid_sys(w->pid, &w->status, w->options | WNOHANG);
|
|
||||||
|
|
||||||
if (!ret) continue;
|
if (!ret) continue;
|
||||||
if (ret == -1) w->errnum = errno;
|
if (ret == -1) w->errnum = errno;
|
||||||
|
|
Loading…
Add table
Reference in a new issue