Skip to content
Snippets Groups Projects
Commit d6ef87ad authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'feat/ignore_neg_fd_poll' into 'master'

feat: ignore negative fd and clear its revents in poll(2)

See merge request redox-os/relibc!484
parents 3c2bc982 c7300009
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,12 @@ pub fn poll_epoll(fds: &mut [pollfd], timeout: c_int) -> c_int {
for i in 0..fds.len() {
let mut pfd = &mut fds[i];
// Ignore the entry with negative fd, set the revents to 0
if pfd.fd < 0 {
pfd.revents = 0;
continue;
}
let mut event = epoll_event {
events: 0,
data: epoll_data { u64: i as u64 },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment