Fix a typo in fd.rs. Fixes #30231.
This commit is contained in:
@@ -60,8 +60,8 @@ impl FileDesc {
|
|||||||
#[cfg(target_env = "newlib")]
|
#[cfg(target_env = "newlib")]
|
||||||
pub fn set_cloexec(&self) {
|
pub fn set_cloexec(&self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let previous = libc::fnctl(self.fd, libc::F_GETFD);
|
let previous = libc::fcntl(self.fd, libc::F_GETFD);
|
||||||
let ret = libc::fnctl(self.fd, libc::F_SETFD, previous | libc::FD_CLOEXEC);
|
let ret = libc::fcntl(self.fd, libc::F_SETFD, previous | libc::FD_CLOEXEC);
|
||||||
debug_assert_eq!(ret, 0);
|
debug_assert_eq!(ret, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user