From: Ray Strode Date: Sat, 3 Oct 2009 03:25:30 +0000 (-0400) Subject: [event-loop] ignore EAGAIN X-Git-Tag: 0.8.0~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e73e8cadd6b2b28e448710cffd85e32eb2083c83;p=thirdparty%2Fplymouth.git [event-loop] ignore EAGAIN Sometimes when debugging under gdb, epoll_wait spuriously returns EAGAIN. We treat it like EINTR now. --- diff --git a/src/libply/ply-event-loop.c b/src/libply/ply-event-loop.c index 33bd52c7..7a757b08 100644 --- a/src/libply/ply-event-loop.c +++ b/src/libply/ply-event-loop.c @@ -1252,14 +1252,14 @@ ply_event_loop_process_pending_events (ply_event_loop_t *loop) if (number_of_received_events < 0) { - if (errno != EINTR) + if (errno != EINTR && errno != EAGAIN) { ply_event_loop_exit (loop, 255); return; } } } - while ((number_of_received_events < 0) && (errno == EINTR)); + while ((number_of_received_events < 0) && ((errno == EINTR) || (errno == EAGAIN))); for (i = 0; i < number_of_received_events; i++) {