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

ruby-changes:14362

From: usa <ko1@a...>
Date: Mon, 28 Dec 2009 23:01:31 +0900 (JST)
Subject: [ruby-changes:14362] Ruby:r26192 (trunk): * win32/win32.c (CreateChild): force to inherit standard I/O handles.

usa	2009-12-28 23:01:12 +0900 (Mon, 28 Dec 2009)

  New Revision: 26192

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

  Log:
    * win32/win32.c (CreateChild): force to inherit standard I/O handles.
      this change fixes [ruby-core:27273], but other side effects might
      exist.

  Modified files:
    trunk/ChangeLog
    trunk/win32/win32.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 26191)
+++ ChangeLog	(revision 26192)
@@ -1,3 +1,9 @@
+Mon Dec 28 22:33:58 2009  NAKAMURA Usaku  <usa@r...>
+
+	* win32/win32.c (CreateChild): force to inherit standard I/O handles.
+	  this change fixes [ruby-core:27273], but other side effects might
+	  exist.
+
 Mon Dec 28 22:00:10 2009  NAKAMURA, Hiroshi  <nahi@r...>
 
 	* test/ruby/test_marshal.rb: added tests for taintness/untrustness
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 26191)
+++ win32/win32.c	(revision 26192)
@@ -956,27 +956,25 @@
     memset(&aStartupInfo, 0, sizeof (STARTUPINFO));
     memset(&aProcessInformation, 0, sizeof (PROCESS_INFORMATION));
     aStartupInfo.cb = sizeof (STARTUPINFO);
-    if (hInput || hOutput || hError) {
-	aStartupInfo.dwFlags = STARTF_USESTDHANDLES;
-	if (hInput) {
-	    aStartupInfo.hStdInput  = hInput;
-	}
-	else {
-	    aStartupInfo.hStdInput  = GetStdHandle(STD_INPUT_HANDLE);
-	}
-	if (hOutput) {
-	    aStartupInfo.hStdOutput = hOutput;
-	}
-	else {
-	    aStartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
-	}
-	if (hError) {
-	    aStartupInfo.hStdError = hError;
-	}
-	else {
-	    aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
-	}
+    aStartupInfo.dwFlags = STARTF_USESTDHANDLES;
+    if (hInput) {
+	aStartupInfo.hStdInput  = hInput;
     }
+    else {
+	aStartupInfo.hStdInput  = GetStdHandle(STD_INPUT_HANDLE);
+    }
+    if (hOutput) {
+	aStartupInfo.hStdOutput = hOutput;
+    }
+    else {
+	aStartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
+    }
+    if (hError) {
+	aStartupInfo.hStdError = hError;
+    }
+    else {
+	aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
+    }
 
     dwCreationFlags = (NORMAL_PRIORITY_CLASS);
 

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

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