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

ruby-changes:9445

From: usa <ko1@a...>
Date: Thu, 25 Dec 2008 13:33:29 +0900 (JST)
Subject: [ruby-changes:9445] Ruby:r20983 (trunk): * io.c: sorry, wrong commit. orz

usa	2008-12-25 13:33:22 +0900 (Thu, 25 Dec 2008)

  New Revision: 20983

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

  Log:
    * io.c: sorry, wrong commit. orz

  Modified files:
    trunk/io.c

Index: io.c
===================================================================
--- io.c	(revision 20982)
+++ io.c	(revision 20983)
@@ -4419,9 +4419,7 @@
         }
     }
 }
-#endif
 
-#if defined(HAVE_FORK) || defined(_WIN32)
 void
 rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds)
 {
@@ -4438,16 +4436,12 @@
 	if (ret != -1 && !(ret & FD_CLOEXEC)) {
             fcntl(fd, F_SETFD, ret|FD_CLOEXEC);
         }
-#elif defined(_WIN32)
-	rb_w32_fd_noinherit(fd);
 #else
 	close(fd);
 #endif
     }
 }
-#endif
 
-#ifdef HAVE_FORK
 static int
 popen_exec(void *pp, char *errmsg, size_t errmsg_len)
 {
@@ -5931,15 +5925,13 @@
 
     fd = NUM2INT(fnum);
     UPDATE_MAXFD(fd);
-#if defined(HAVE_FCNTL) && defined(F_GETFL)
     if (NIL_P(vmode)) {
+#if defined(HAVE_FCNTL) && defined(F_GETFL)
         oflags = fcntl(fd, F_GETFL);
         if (oflags == -1) rb_sys_fail(0);
         fmode = rb_io_oflags_fmode(oflags);
-    }
-#elif defined(_WIN32)
-    if (rb_w32_is_valid_fd(fd)) rb_sys_fail(0);
 #endif
+    }
     MakeOpenFile(io, fp);
     fp->fd = fd;
     fp->mode = fmode;

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

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