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

ruby-changes:21608

From: akr <ko1@a...>
Date: Mon, 7 Nov 2011 22:06:23 +0900 (JST)
Subject: [ruby-changes:21608] akr:r33657 (trunk): * ext/gdbm/gdbm.c (fgdbm_initialize): set close-on-exec flag.

akr	2011-11-07 22:05:43 +0900 (Mon, 07 Nov 2011)

  New Revision: 33657

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

  Log:
    * ext/gdbm/gdbm.c (fgdbm_initialize): set close-on-exec flag.

  Modified files:
    trunk/ChangeLog
    trunk/ext/gdbm/gdbm.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 33656)
+++ ChangeLog	(revision 33657)
@@ -1,3 +1,7 @@
+Mon Nov  7 22:03:47 2011  Tanaka Akira  <akr@f...>
+
+	* ext/gdbm/gdbm.c (fgdbm_initialize): set close-on-exec flag.
+
 Mon Nov  7 20:31:52 2011  Aaron Patterson <aaron@t...>
 
 	* ext/psych/lib/psych/scalar_scanner.rb: make sure strings that look
Index: ext/gdbm/gdbm.c
===================================================================
--- ext/gdbm/gdbm.c	(revision 33656)
+++ ext/gdbm/gdbm.c	(revision 33657)
@@ -222,6 +222,10 @@
                             GDBM_READER|flags, 0, MY_FATAL_FUNC);
     }
 
+    if (dbm) {
+        rb_fd_fix_cloexec(gdbm_fdesc(dbm));
+    }
+
     if (!dbm) {
         if (mode == -1) return Qnil;
 

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

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