summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/gdbm/gdbm.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index bfc8597b770..911580bb28a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Nov 13 23:21:24 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/gdbm/gdbm.c (fgdbm_reorganize): set close-on-exec flag after
+ gdbm_reorganize(). gdbm_reorganize() opens a new database internally.
+
Sun Nov 13 19:57:18 2011 Tanaka Akira <akr@fsij.org>
* ext/dbm/extconf.rb: rollback for each headers for each libraries.
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c
index 00fbac93d7d..328feef0e91 100644
--- a/ext/gdbm/gdbm.c
+++ b/ext/gdbm/gdbm.c
@@ -1052,6 +1052,7 @@ fgdbm_reorganize(VALUE obj)
rb_gdbm_modify(obj);
GetDBM2(obj, dbmp, dbm);
gdbm_reorganize(dbm);
+ rb_fd_fix_cloexec(gdbm_fdesc(dbm));
return obj;
}