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

ruby-changes:21764

From: nobu <ko1@a...>
Date: Tue, 22 Nov 2011 11:34:12 +0900 (JST)
Subject: [ruby-changes:21764] nobu:r33813 (trunk): * win32/win32.c (dupfd): argument of _osfhnd and so on should not

nobu	2011-11-22 11:34:00 +0900 (Tue, 22 Nov 2011)

  New Revision: 33813

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

  Log:
    * win32/win32.c (dupfd): argument of _osfhnd and so on should not
      have side effect.

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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 33812)
+++ ChangeLog	(revision 33813)
@@ -1,3 +1,8 @@
+Tue Nov 22 11:33:58 2011  Nobuyoshi Nakada  <nobu@r...>
+
+	* win32/win32.c (dupfd): argument of _osfhnd and so on should not
+	  have side effect.
+
 Tue Nov 22 11:26:08 2011  NARUSE, Yui  <naruse@r...>
 
 	* bignum.c (): refix of r33536. Don't change behavior of Bignum#/.
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 33812)
+++ win32/win32.c	(revision 33813)
@@ -3818,8 +3818,9 @@
   close_fds_and_return:
     save_errno = errno;
     while (filled > 0) {
-	_osfhnd(fds[--filled]) = (intptr_t)INVALID_HANDLE_VALUE;
-	close(fds[filled]);
+	int fd = fds[--filled];
+	_osfhnd(fd) = (intptr_t)INVALID_HANDLE_VALUE;
+	close(fd);
     }
     errno = save_errno;
 

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

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