path: root/doc
diff options
authorSergey Poznyakoff <gray@gnu.org.ua>2011-11-11 10:37:37 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2011-11-11 10:37:37 +0000
commit99d79193981246f988f10cde380f339f1aca7a70 (patch)
tree0ea660bb3ee85550ae0427f6e33ec07094355a0d /doc
parent902a2e4bb5aa53241898ae34dcf7aafb29df7b7e (diff)
Support close-on-exec flag for gdbm_open call.
* src/gdbm.h.in (GDBM_CLOEXEC): New flag. * src/systems.h [O_CLOEXEC]: Provide a placeholder definition. * src/gdbmopen.c (gdbm_open): Honor the GDBM_CLOEXEC flag. * compat/dbmopen.c (ndbm_open_dir_file0): Mask out open mode before comparing with GDBM_READER. Support GDBM_CLOEXEC. (dbm_open): Translate O_CLOEXEC to GDBM_CLOEXEC. * doc/gdbm.texinfo: Document GDBM_CLOEXEC. * NEWS: Update.
Diffstat (limited to 'doc')
1 files changed, 16 insertions, 5 deletions
diff --git a/doc/gdbm.texinfo b/doc/gdbm.texinfo
index 010f6f0..1876c3a 100644
--- a/doc/gdbm.texinfo
+++ b/doc/gdbm.texinfo
@@ -296,10 +296,20 @@ The following may also be logically or'd into the database flags:
synchronized to the disk, @samp{GDBM_NOLOCK}, which prevents the library
from performing any locking on the database file, and @samp{GDBM_NOMMAP},
which disables the memory mapping mechanism. The option @samp{GDBM_FAST} is
-now obsolete, since @code{gdbm} defaults to no-sync mode. Any error detected
-will cause a return value of @samp{NULL} and an appropriate value will be in
-@code{gdbm_errno} (@pxref{Variables}). If no errors occur, a pointer to the
-@code{gdbm} file descriptor will be returned.
+now obsolete, since @code{gdbm} defaults to no-sync mode.
+@kwindex GDBM_CLOEXEC
+@cindex close-on-exec
+If the host @samp{open} call
+(@uref{http://www.manpagez.com/man/2/open, open(2)})
+@end ifhtml
+(@pxref{open,,,open(2),open(2) man page})
+@end ifnothtml
+supports the @samp{O_CLOEXEC} flag, the @samp{GDBM_CLOEXEC} can be
+or'd into the flags, to enable the close-on-exec flag for the
+database file descriptor.
@item mode
File mode (see
@@ -1578,7 +1588,8 @@ The functions below implement the @acronym{POSIX} @samp{ndbm} interface:
Opens a database. The @var{file} argument is the full name of the
database file to be opened. The function opens two files:
@file{@var{file}.pag} and @file{@var{file}.dir}. The @var{flags} and
-@var{mode} arguments have the same meaning as the second and third arguments of
+@var{mode} arguments have the same meaning as the second and third
+arguments of
@end ifhtml

Return to:

Send suggestions and report system problems to the System administrator.