summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ext/gdbm/gdbm.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 35a83a1a54f..29283eb382f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Nov 7 22:03:47 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/gdbm/gdbm.c (fgdbm_initialize): set close-on-exec flag.
+
Mon Nov 7 20:31:52 2011 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/lib/psych/scalar_scanner.rb: make sure strings that look
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c
index 2b4ebfd26ca..7276151cf11 100644
--- a/ext/gdbm/gdbm.c
+++ b/ext/gdbm/gdbm.c
@@ -222,6 +222,10 @@ fgdbm_initialize(int argc, VALUE *argv, VALUE obj)
GDBM_READER|flags, 0, MY_FATAL_FUNC);
}
+ if (dbm) {
+ rb_fd_fix_cloexec(gdbm_fdesc(dbm));
+ }
+
if (!dbm) {
if (mode == -1) return Qnil;