mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
Change read_blocked parameter type to RawFd for clarity
This commit is contained in:
parent
14fc11b5b8
commit
ed3fdaa665
1 changed files with 1 additions and 1 deletions
|
@ -1433,7 +1433,7 @@ fn can_be_encoded(wc: char) -> bool {
|
|||
|
||||
/// Call read, blocking and repeating on EINTR. Exits on EAGAIN.
|
||||
/// \return the number of bytes read, or 0 on EOF. On EAGAIN, returns -1 if nothing was read.
|
||||
pub fn read_blocked(fd: i32, mut buf: &mut [u8]) -> isize {
|
||||
pub fn read_blocked(fd: RawFd, mut buf: &mut [u8]) -> isize {
|
||||
loop {
|
||||
let res = unsafe { libc::read(fd, std::ptr::addr_of_mut!(buf).cast(), buf.len()) };
|
||||
if res < 0 && errno::errno().0 == EINTR {
|
||||
|
|
Loading…
Reference in a new issue