Skip to content

Commit

Permalink
Set FD_CLOEXEC flag on duplicated kqueue Poll
Browse files Browse the repository at this point in the history
Same as commit c52635c, but for kqueue.
  • Loading branch information
Thomasdezeeuw committed Jun 14, 2021
1 parent c52635c commit cbcaedf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sys/unix/selector/kqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl Selector {
}

pub fn try_clone(&self) -> io::Result<Selector> {
syscall!(dup(self.kq)).map(|kq| Selector {
syscall!(fcntl(self.kq, libc::F_DUPFD_CLOEXEC)).map(|kq| Selector {
// It's the same selector, so we use the same id.
#[cfg(debug_assertions)]
id: self.id,
Expand Down

0 comments on commit cbcaedf

Please sign in to comment.