mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 23:11:14 -03:00
committed by
Johannes Altmanninger
parent
66ea0f78be
commit
9dfb5705c5
@@ -420,8 +420,7 @@ pub fn read_once(fd: RawFd, buffer: &mut MutexGuard<'_, SeparatedBuffer>) -> isi
|
||||
|
||||
// We want to swallow EINTR only; in particular EAGAIN needs to be returned back to the caller.
|
||||
let amt = loop {
|
||||
let amt =
|
||||
unsafe { libc::read(fd, bytes.as_mut_ptr().cast(), std::mem::size_of_val(&bytes)) };
|
||||
let amt = unsafe { libc::read(fd, bytes.as_mut_ptr().cast(), size_of_val(&bytes)) };
|
||||
if amt < 0 && errno::errno().0 == EINTR {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user