libcamera: event_dispatcher_poll: Handle interrupted ppoll() calls

The ppoll() call can be interrupted if a signal is delivered. Handle the
EINTR error code gracefully by restarting the call. This fixes the
event-dispatcher test failure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart
2019-01-23 18:51:56 +02:00
parent 83c73c39c5
commit d370c1b46e
2 changed files with 34 additions and 25 deletions
@@ -41,6 +41,7 @@ private:
std::map<int, EventNotifierSetPoll> notifiers_;
std::list<Timer *> timers_;
int poll(std::vector<struct pollfd> *pollfds);
void processNotifiers(const std::vector<struct pollfd> &pollfds);
void processTimers();
};