[前][次][番号順一覧][スレッド一覧]

ruby-changes:52333

From: normal <ko1@a...>
Date: Sun, 26 Aug 2018 13:29:20 +0900 (JST)
Subject: [ruby-changes:52333] normal:r64541 (trunk): process.c: remove worthless waitpid_sys macro

normal	2018-08-26 13:29:11 +0900 (Sun, 26 Aug 2018)

  New Revision: 64541

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64541

  Log:
    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.

  Modified files:
    trunk/process.c
Index: process.c
===================================================================
--- process.c	(revision 64540)
+++ process.c	(revision 64541)
@@ -995,8 +995,6 @@ waitpid_notify(struct waitpid_state *w, https://github.com/ruby/ruby/blob/trunk/process.c#L995
     }
 }
 
-#  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) https://github.com/ruby/ruby/blob/trunk/process.c#L1003
     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;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]