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 12, 2021
1 parent d1617b5 commit b367a05
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 b367a05

Please sign in to comment.