We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64ed318 commit abb879dCopy full SHA for abb879d
2 files changed
compio-driver/src/iour/op.rs
@@ -45,7 +45,7 @@ impl<
45
impl OpCode for OpenFile {
46
fn create_entry(self: Pin<&mut Self>) -> OpEntry {
47
opcode::OpenAt::new(Fd(libc::AT_FDCWD), self.path.as_ptr())
48
- .flags(self.flags)
+ .flags(self.flags | libc::O_CLOEXEC)
49
.mode(self.mode)
50
.build()
51
.into()
compio-driver/src/poll/op.rs
@@ -56,7 +56,7 @@ impl OpCode for OpenFile {
56
fn operate(self: Pin<&mut Self>) -> Poll<io::Result<usize>> {
57
Poll::Ready(Ok(syscall!(open(
58
self.path.as_ptr(),
59
- self.flags,
+ self.flags | libc::O_CLOEXEC,
60
self.mode as libc::c_int
61
))? as _))
62
}
0 commit comments