mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Set FD_CLOEXEC after each file open
Summary: as subject. This is causing problem in adsconv. Ideally, this flags should be set in open. But that is only supported in Linux kernel ≥2.6.23 and glibc ≥2.7. Test Plan: db_test run db_test Reviewers: dhruba, MarkCallaghan, haobo Reviewed By: dhruba CC: leveldb, chip Differential Revision: https://reviews.facebook.net/D10089
This commit is contained in:
@@ -385,6 +385,9 @@ class EnvOptions {
|
||||
|
||||
// If true, then use mmap to write data
|
||||
virtual bool UseMmapWrites() const = 0;
|
||||
|
||||
// If true, set the FD_CLOEXEC on open fd.
|
||||
virtual bool IsFDCloseOnExec() const = 0;
|
||||
};
|
||||
|
||||
// Log the specified data to *info_log if info_log is non-nullptr.
|
||||
|
||||
@@ -415,6 +415,9 @@ struct Options {
|
||||
|
||||
// Allow the OS to mmap file for writing. Default: true
|
||||
bool allow_mmap_writes;
|
||||
|
||||
// Disable child process inherit open files. Default: true
|
||||
bool is_fd_close_on_exec;
|
||||
};
|
||||
|
||||
// Options that control read operations
|
||||
|
||||
Reference in New Issue
Block a user