Skip to content

Commit b367a05

Browse files
committed
Set FD_CLOEXEC flag on duplicated kqueue Poll
Same as commit c52635c, but for kqueue.
1 parent d1617b5 commit b367a05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sys/unix/selector/kqueue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl Selector {
8787
}
8888

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

0 commit comments

Comments
 (0)