From bc12482932a6771566c7dcabc53f34e6297510f2 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Fri, 11 Nov 2011 18:39:42 +0000 Subject: Implement cloexec in gdbm_reorganize. Add test cases. * compat/dbmopen.c: Apply O_CLOEXEC for newly created dir file, if requested. * src/gdbmdefs.h (gdbm_file_info) : New member. * src/gdbmopen.c (gdbm_open): Initialize cloexec member. * src/gdbmreorg.c (gdbm_reorganize): Propagate cloexec bit to the new database. * tests/.cvsignore: Update. * tests/cloexec00.at: New test case. * tests/cloexec01.at: Likewise. * tests/cloexec02.at: Likewise. * tests/cloexec03.at: Likewise. * fdop.c: New auxiliary program. * g_open_ce: New test program. * g_reorg_ce: New test program. * d_creat_ce: New test program. * tests/Makefile.am: Add new test cases and test programs. * tests/testsuite.at: Include new test cases. * doc/gdbm.texinfo: Minor change. --- doc/gdbm.texinfo | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/gdbm.texinfo') diff --git a/doc/gdbm.texinfo b/doc/gdbm.texinfo index 1876c3a..f676dcd 100644 --- a/doc/gdbm.texinfo +++ b/doc/gdbm.texinfo @@ -1603,6 +1603,10 @@ unspecified. The function returns a pointer to the @code{DBM} structure describing the database. This pointer is used to refer to this database in all operations described below. + +Any error detected will cause a return value of @samp{NULL} and an +appropriate value will be stored in @code{gdbm_errno} +(@pxref{Variables}). @end deftypefn @deftypefn {ndbm} void dbm_close (DBM *@var{dbf}) -- cgit v1.2.1