From 84786479c298e83545b70a3cb879057f4b0bd6e7 Mon Sep 17 00:00:00 2001 From: pjht Date: Sun, 22 Sep 2024 11:44:16 -0500 Subject: [PATCH] Fix polling for input data on the master side of a PTY --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8855c35..2eabba4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -198,7 +198,7 @@ impl Pty { fn curr_master_poll(&self) -> PollEvents { let mut events = PollEvents::POLLOUT; if !self.output_buffer.lock().is_empty() { - events |= PollEvents::POLLOUT; + events |= PollEvents::POLLIN; } events } @@ -289,7 +289,7 @@ impl file_rpc::Server for Serv { if !self.polls.lock().contains(poll_id) { return None; } - let curr_poll =if slave { + let curr_poll = if slave { self.ptys.read()[pty_no].curr_slave_poll() } else { self.ptys.read()[pty_no].curr_master_poll()