diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-11-11 18:39:42 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-11-11 18:39:42 +0000 |
commit | bc12482932a6771566c7dcabc53f34e6297510f2 (patch) | |
tree | b6f3f100201a5475fecdd1df66a45b1178831457 /src/gdbmdefs.h | |
parent | 894b78d5bcb7b609a3b52ce804306a63c4761282 (diff) | |
download | gdbm-bc12482932a6771566c7dcabc53f34e6297510f2.tar.gz gdbm-bc12482932a6771566c7dcabc53f34e6297510f2.tar.bz2 |
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) <cloexec>: 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.
Diffstat (limited to 'src/gdbmdefs.h')
-rw-r--r-- | src/gdbmdefs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gdbmdefs.h b/src/gdbmdefs.h index b5922e3..519d688 100644 --- a/src/gdbmdefs.h +++ b/src/gdbmdefs.h @@ -156,6 +156,9 @@ struct gdbm_file_info { /* Whether or not we're allowing mmap() use. */ unsigned memory_mapping :1; + + /* Whether the database was open with GDBM_CLOEXEC flag */ + unsigned cloexec :1; /* Type of file locking in use. */ enum { LOCKING_NONE = 0, LOCKING_FLOCK, LOCKING_LOCKF, |