From ce8b4c20f67642f7d8f2bd7e41c6a3d4a7eb081b Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Thu, 21 Aug 2025 14:42:11 +0300 Subject: [PATCH] core/io: Don't open file as non-blocking in Unix backend The Unix backend is a syscall()-based, blocking implementation. The O_NONBLOCK adds nothing. --- core/io/unix.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/io/unix.rs b/core/io/unix.rs index 0fe95aa4b..e1fd76b41 100644 --- a/core/io/unix.rs +++ b/core/io/unix.rs @@ -6,7 +6,7 @@ use crate::Result; use parking_lot::Mutex; use rustix::{ fd::{AsFd, AsRawFd}, - fs::{self, FlockOperation, OFlags, OpenOptionsExt}, + fs::{self, FlockOperation}, }; use std::os::fd::RawFd; @@ -97,7 +97,7 @@ impl IO for UnixIO { fn open_file(&self, path: &str, flags: OpenFlags, _direct: bool) -> Result> { trace!("open_file(path = {})", path); let mut file = std::fs::File::options(); - file.read(true).custom_flags(OFlags::NONBLOCK.bits() as i32); + file.read(true); if !flags.contains(OpenFlags::ReadOnly) { file.write(true);