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

ruby-changes:39121

From: usa <ko1@a...>
Date: Thu, 9 Jul 2015 15:11:05 +0900 (JST)
Subject: [ruby-changes:39121] usa:r51202 (trunk): * win32/win32.c (waitpid): return immediately if interrupted.

usa	2015-07-09 15:10:47 +0900 (Thu, 09 Jul 2015)

  New Revision: 51202

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

  Log:
    * win32/win32.c (waitpid): return immediately if interrupted.
      reported by <takkanm AT gmail.com> [ruby-dev:49176] [Bug #11340]

  Modified files:
    trunk/ChangeLog
    trunk/win32/win32.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51201)
+++ ChangeLog	(revision 51202)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jul  9 15:07:12 2015  NAKAMURA Usaku  <usa@r...>
+
+	* win32/win32.c (waitpid): return immediately if interrupted.
+	  reported by <takkanm AT gmail.com> [ruby-dev:49176] [Bug #11340]
+
 Thu Jul  9 13:03:46 2015  Koichi Sasada  <ko1@a...>
 
 	* vm_insnhelper.c (vm_search_super_method): use CI_SET_FASTPATH().
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 51201)
+++ win32/win32.c	(revision 51202)
@@ -4296,9 +4296,10 @@ waitpid(rb_pid_t pid, int *stat_loc, int https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L4296
 
 	while (!(pid = poll_child_status(child, stat_loc))) {
 	    /* wait... */
+	    errno = 0;
 	    if (rb_w32_wait_events_blocking(&child->hProcess, 1, timeout) != WAIT_OBJECT_0) {
 		/* still active */
-		if (options & WNOHANG) {
+		if ((options & WNOHANG) || errno == EINTR) {
 		    pid = 0;
 		    break;
 		}

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

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