diff --git a/src/flag.rs b/src/flag.rs index a8f22e63e8..fff6d17952 100644 --- a/src/flag.rs +++ b/src/flag.rs @@ -56,6 +56,9 @@ pub const F_SETFD: usize = 2; pub const F_GETFL: usize = 3; pub const F_SETFL: usize = 4; +/// Duplicate file descriptor with close-on-exec set (Red Bear extension; libredox ABI). +pub const F_DUPFD_CLOEXEC: usize = 5; + pub const FUTEX_WAIT: usize = 0; pub const FUTEX_WAKE: usize = 1; pub const FUTEX_REQUEUE: usize = 2; @@ -201,6 +204,9 @@ pub const O_NOFOLLOW: usize = 0x8000_0000; pub const O_ACCMODE: usize = O_RDONLY | O_WRONLY | O_RDWR; pub const O_FCNTL_MASK: usize = O_NONBLOCK | O_APPEND | O_ASYNC | O_FSYNC; +/// Atomically set close-on-exec when opening a file (Red Bear extension; libredox ABI). +pub const O_CLOEXEC: usize = 0x0100_0000; + /// Remove directory instead of unlinking file. pub const AT_REMOVEDIR: usize = 0x200;