Fix polling for input data on the master side of a PTY
This commit is contained in:
parent
932485e5ab
commit
84786479c2
@ -198,7 +198,7 @@ impl Pty {
|
|||||||
fn curr_master_poll(&self) -> PollEvents {
|
fn curr_master_poll(&self) -> PollEvents {
|
||||||
let mut events = PollEvents::POLLOUT;
|
let mut events = PollEvents::POLLOUT;
|
||||||
if !self.output_buffer.lock().is_empty() {
|
if !self.output_buffer.lock().is_empty() {
|
||||||
events |= PollEvents::POLLOUT;
|
events |= PollEvents::POLLIN;
|
||||||
}
|
}
|
||||||
events
|
events
|
||||||
}
|
}
|
||||||
@ -289,7 +289,7 @@ impl file_rpc::Server for Serv {
|
|||||||
if !self.polls.lock().contains(poll_id) {
|
if !self.polls.lock().contains(poll_id) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
let curr_poll =if slave {
|
let curr_poll = if slave {
|
||||||
self.ptys.read()[pty_no].curr_slave_poll()
|
self.ptys.read()[pty_no].curr_slave_poll()
|
||||||
} else {
|
} else {
|
||||||
self.ptys.read()[pty_no].curr_master_poll()
|
self.ptys.read()[pty_no].curr_master_poll()
|
||||||
|
Loading…
Reference in New Issue
Block a user