Skip to content

Commit

Permalink
Merge pull request #47 from andfoy/fix_eof_error
Browse files Browse the repository at this point in the history
Prevent iseof from returning immediately
  • Loading branch information
andfoy authored Jan 2, 2023
2 parents 409fef9 + e6dc3ae commit dc9565f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pty/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ fn is_eof(process: HANDLE, stream: HANDLE) -> Result<bool, OsString> {
let bytes_ptr: *mut u32 = ptr::addr_of_mut!(*bytes.as_mut_ptr());
let bytes_ref = Some(bytes_ptr);
let succ = PeekNamedPipe(
stream, None, 0, bytes_ref, None, None).as_bool();
stream, None, 0, None, bytes_ref, None).as_bool();

let total_bytes = bytes.assume_init();
if succ {
Expand Down

0 comments on commit dc9565f

Please sign in to comment.