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

ruby-changes:19745

From: yugui <ko1@a...>
Date: Mon, 30 May 2011 07:53:05 +0900 (JST)
Subject: [ruby-changes:19745] yugui:r31789 (ruby_1_9_2): merges r31152 and r31154 from trunk into ruby_1_9_2.

yugui	2011-05-30 07:48:07 +0900 (Mon, 30 May 2011)

  New Revision: 31789

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

  Log:
    merges r31152 and r31154 from trunk into ruby_1_9_2.
    --
    * win32/win32.c: wait process real termination after reading 
      exit code. fixes #4518
    --
    * win32/win32.c: fix r31152 (dup line)

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/version.h
    branches/ruby_1_9_2/win32/win32.c

Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 31788)
+++ ruby_1_9_2/ChangeLog	(revision 31789)
@@ -1,3 +1,8 @@
+Wed Mar 23 00:12:16 2011  Tajima Akio <artonx@y...>
+
+	* win32/win32.c: wait process real termination after reading 
+	  exit code. fixes #4518
+
 Wed Mar 16 15:06:21 2011  Eric Hodel  <drbrain@s...>
 
 	* ext/openssl/lib/openssl/buffering.rb (module OpenSSL): #flush should
Index: ruby_1_9_2/win32/win32.c
===================================================================
--- ruby_1_9_2/win32/win32.c	(revision 31788)
+++ ruby_1_9_2/win32/win32.c	(revision 31789)
@@ -3559,6 +3559,7 @@
 
     if (!GetExitCodeProcess(child->hProcess, &exitcode)) {
 	/* If an error occured, return immediatly. */
+    error_exit:
 	err = GetLastError();
 	if (err == ERROR_INVALID_PARAMETER)
 	    errno = ECHILD;
@@ -3572,8 +3573,12 @@
 	return -1;
     }
     if (exitcode != STILL_ACTIVE) {
-	/* If already died, return immediatly. */
-	rb_pid_t pid = child->pid;
+        rb_pid_t pid;
+	/* If already died, wait process's real termination. */
+        if (rb_w32_wait_events_blocking(&child->hProcess, 1, INFINITE) != WAIT_OBJECT_0) {
+	    goto error_exit;
+        }
+	pid = child->pid;
 	CloseChildHandle(child);
 	if (stat_loc) *stat_loc = exitcode << 8;
 	return pid;
Index: ruby_1_9_2/version.h
===================================================================
--- ruby_1_9_2/version.h	(revision 31788)
+++ ruby_1_9_2/version.h	(revision 31789)
@@ -1,13 +1,13 @@
 #define RUBY_VERSION "1.9.2"
-#define RUBY_PATCHLEVEL 216
+#define RUBY_PATCHLEVEL 217
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1
 
 #define RUBY_RELEASE_YEAR 2011
 #define RUBY_RELEASE_MONTH 5
-#define RUBY_RELEASE_DAY 29
-#define RUBY_RELEASE_DATE "2011-05-29"
+#define RUBY_RELEASE_DAY 30
+#define RUBY_RELEASE_DATE "2011-05-30"
 
 #include "ruby/version.h"
 

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

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