Handle EAGAIN like we do ENOMEM from poll() and select().
On some systems, poll() and select() can return EAGAIN instead of ENOMEM if there is a kernel resource shortage. In this case we just re-enter the event loop and retry.
This commit is contained in:
@@ -661,7 +661,7 @@ rescan:
|
||||
nready = sudo_ev_scan_impl(base, flags);
|
||||
switch (nready) {
|
||||
case -1:
|
||||
if (errno == ENOMEM)
|
||||
if (errno == ENOMEM || errno == EAGAIN)
|
||||
continue;
|
||||
if (errno == EINTR) {
|
||||
/* Interrupted by signal, check for sigevents. */
|
||||
|
Reference in New Issue
Block a user