mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/gdbm/gdbm.c (fgdbm_initialize): use GDBM_CLOEXEC if available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
266d09839b
commit
268f6c3680
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Fri Nov 11 21:13:30 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/gdbm/gdbm.c (fgdbm_initialize): use GDBM_CLOEXEC if available.
|
||||
|
||||
Fri Nov 11 21:00:05 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/dbm/extconf.rb: fix dbm_pagfno and dbm_dirfno detection with
|
||||
|
|
|
@ -210,6 +210,11 @@ fgdbm_initialize(int argc, VALUE *argv, VALUE obj)
|
|||
|
||||
SafeStringValue(file);
|
||||
|
||||
#ifdef GDBM_CLOEXEC
|
||||
/* GDBM_CLOEXEC is implemented in gdbm 1.9.90 (development version after gdbm-1.9.1). */
|
||||
flags |= GDBM_CLOEXEC;
|
||||
#endif
|
||||
|
||||
if (flags & RUBY_GDBM_RW_BIT) {
|
||||
flags &= ~RUBY_GDBM_RW_BIT;
|
||||
dbm = gdbm_open(RSTRING_PTR(file), MY_BLOCK_SIZE,
|
||||
|
|
Loading…
Add table
Reference in a new issue