aboutsummaryrefslogtreecommitdiff
path: root/doc/gdbm.texinfo
diff options
context:
space:
mode:
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/gdbm.texinfo
parent902a2e4bb5aa53241898ae34dcf7aafb29df7b7e (diff)
downloadgdbm-99d79193981246f988f10cde380f339f1aca7a70.tar.gz
gdbm-99d79193981246f988f10cde380f339f1aca7a70.tar.bz2
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/gdbm.texinfo')
-rw-r--r--doc/gdbm.texinfo21
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:
296synchronized to the disk, @samp{GDBM_NOLOCK}, which prevents the library 296synchronized to the disk, @samp{GDBM_NOLOCK}, which prevents the library
297from performing any locking on the database file, and @samp{GDBM_NOMMAP}, 297from performing any locking on the database file, and @samp{GDBM_NOMMAP},
298which disables the memory mapping mechanism. The option @samp{GDBM_FAST} is 298which disables the memory mapping mechanism. The option @samp{GDBM_FAST} is
299now obsolete, since @code{gdbm} defaults to no-sync mode. Any error detected 299now obsolete, since @code{gdbm} defaults to no-sync mode.
300will cause a return value of @samp{NULL} and an appropriate value will be in 300
301@code{gdbm_errno} (@pxref{Variables}). If no errors occur, a pointer to the 301@kwindex GDBM_CLOEXEC
302@code{gdbm} file descriptor will be returned. 302@cindex close-on-exec
303If the host @samp{open} call
304@ifhtml
305(@uref{http://www.manpagez.com/man/2/open, open(2)})
306@end ifhtml
307@ifnothtml
308(@pxref{open,,,open(2),open(2) man page})
309@end ifnothtml
310supports the @samp{O_CLOEXEC} flag, the @samp{GDBM_CLOEXEC} can be
311or'd into the flags, to enable the close-on-exec flag for the
312database file descriptor.
303@item mode 313@item mode
304File mode (see 314File mode (see
305@ifhtml 315@ifhtml
@@ -1578,7 +1588,8 @@ The functions below implement the @acronym{POSIX} @samp{ndbm} interface:
1578Opens a database. The @var{file} argument is the full name of the 1588Opens a database. The @var{file} argument is the full name of the
1579database file to be opened. The function opens two files: 1589database file to be opened. The function opens two files:
1580@file{@var{file}.pag} and @file{@var{file}.dir}. The @var{flags} and 1590@file{@var{file}.pag} and @file{@var{file}.dir}. The @var{flags} and
1581@var{mode} arguments have the same meaning as the second and third arguments of 1591@var{mode} arguments have the same meaning as the second and third
1592arguments of
1582@ifhtml 1593@ifhtml
1583@uref{http://www.manpagez.com/man/2/open,,open(2)}, 1594@uref{http://www.manpagez.com/man/2/open,,open(2)},
1584@end ifhtml 1595@end ifhtml

Return to:

Send suggestions and report system problems to the System administrator.