mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-01-30 04:19:20 +00:00
sys_util: handle EINTR return from epoll_wait
The PollContext::wait returns Error on EINTR, which often happens during suspend/resume cycles. Because this Error is transient, this should be handled internally with a retry until a fatal error is encountered. BUG=chromium:834558 TEST=run crosvm, suspend, resume, observe crosvm still running Change-Id: I75469e261ddf28f025a3b3b93612538ccf1230b9 Reviewed-on: https://chromium-review.googlesource.com/1018527 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
This commit is contained in:
parent
7a7268faf0
commit
d14c41a81f
1 changed files with 4 additions and 4 deletions
|
@ -418,10 +418,10 @@ impl<T: PollToken> PollContext<T> {
|
|||
// Safe because we give an epoll context and a properly sized epoll_events array
|
||||
// pointer, which we trust the kernel to fill in properly.
|
||||
unsafe {
|
||||
epoll_wait(self.epoll_ctx.as_raw_fd(),
|
||||
&mut epoll_events[0],
|
||||
max_events,
|
||||
timeout_millis)
|
||||
handle_eintr_errno!(epoll_wait(self.epoll_ctx.as_raw_fd(),
|
||||
&mut epoll_events[0],
|
||||
max_events,
|
||||
timeout_millis))
|
||||
}
|
||||
};
|
||||
if ret < 0 {
|
||||
|
|
Loading…
Reference in a new issue