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

ruby-changes:21516

From: nobu <ko1@a...>
Date: Sun, 30 Oct 2011 10:48:49 +0900 (JST)
Subject: [ruby-changes:21516] nobu:r33565 (trunk): * io.c (rb_cloexec_dup, rb_cloexec_dup2): CLOEXEC has been set if

nobu	2011-10-30 10:47:23 +0900 (Sun, 30 Oct 2011)

  New Revision: 33565

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

  Log:
    * io.c (rb_cloexec_dup, rb_cloexec_dup2): CLOEXEC has been set if
      dup3 succeeded.

  Modified files:
    trunk/ChangeLog
    trunk/io.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 33564)
+++ ChangeLog	(revision 33565)
@@ -1,3 +1,8 @@
+Sun Oct 30 10:47:20 2011  Nobuyoshi Nakada  <nobu@r...>
+
+	* io.c (rb_cloexec_dup, rb_cloexec_dup2): CLOEXEC has been set if
+	  dup3 succeeded.
+
 Sun Oct 30 09:58:48 2011  Tanaka Akira  <akr@f...>
 
 	* io.c (rb_cloexec_dup): don't allocate standard file descriptors.
Index: io.c
===================================================================
--- io.c	(revision 33564)
+++ io.c	(revision 33565)
@@ -217,6 +217,9 @@
             try_fcntl = 0;
             ret = dup(oldfd);
         }
+        else {
+            return ret;
+        }
     }
     else {
         ret = dup(oldfd);
@@ -246,6 +249,9 @@
             try_dup3 = 0;
             ret = dup2(oldfd, newfd);
         }
+        else {
+            return ret;
+        }
     }
     else {
         ret = dup2(oldfd, newfd);

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

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