Added default feature `default-cloexec`: If this feature is set, file-descriptors will be created with the close-on-exec flag (`MFD_CLOEXEC` for memfds, `FD_CLOEXEC` for other pseudofiles and `O_CLOEXEC` for `open()` calls.)
This is a temporary means of adding cloexec configuration to the crate, the interface is not modified and unless the default feature is not selected ABI-compat will remain the same. NOTE: This is intended to be removed on the next interface-changing update.
Fortune for mapped-file's current commit: Future curse − 末凶
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
[features]
default=["default-cloexec"]
# Add support for file-descriptor operations other than simply mapping
# Add support for file-descriptor operations other than simply mapping
# TODO: XXX: Incomplete, will be enabled by default when complete
# TODO: XXX: Incomplete, will be enabled by default when complete
file=[]
file=[]
# Default to opening any internal file-descriptors as `O_CLOEXEC` (close-on-execute.)
# For `file` feature: `MFD_CLOEXEC`/`FD_CLOEXEC` will be used in creation of all memfds by default.
#
# NOTE: This is currently not configureable within the interface. To prevent API-break, this feature exists to allow some configuration of this option. (TODO: In the future, this should be in the interface for `MemoryFile`/`NamedMemoryFile` et al.)
assert_eq!(super::DEFAULT_FLAGS,cfg!(feature="default-cloexec").then(||super::MFD_CLOEXEC).unwrap_or_default(),"Compile-time default creation flags are not in accordance with provided global crate configuration");