зеркало из https://github.com/github/ruby.git
* 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:
Родитель
266d09839b
Коммит
268f6c3680
|
@ -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>
|
Fri Nov 11 21:00:05 2011 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* ext/dbm/extconf.rb: fix dbm_pagfno and dbm_dirfno detection with
|
* 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);
|
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) {
|
if (flags & RUBY_GDBM_RW_BIT) {
|
||||||
flags &= ~RUBY_GDBM_RW_BIT;
|
flags &= ~RUBY_GDBM_RW_BIT;
|
||||||
dbm = gdbm_open(RSTRING_PTR(file), MY_BLOCK_SIZE,
|
dbm = gdbm_open(RSTRING_PTR(file), MY_BLOCK_SIZE,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче