mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-03-01 08:12:23 +07:00
udevd: on_worker - distinguish between EINTR and EAGAIN
EAGAIN means there are no more messages to read, so give up. EINTR means we got interrupted reading a message, so try again. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
parent
8ab818626d
commit
a5be4ae907
@ -641,8 +641,11 @@ static void worker_returned(int fd_worker) {
|
|||||||
|
|
||||||
size = recvmsg(fd_worker, &msghdr, MSG_DONTWAIT);
|
size = recvmsg(fd_worker, &msghdr, MSG_DONTWAIT);
|
||||||
if (size < 0) {
|
if (size < 0) {
|
||||||
if (errno == EAGAIN || errno == EINTR)
|
if (errno == EINTR)
|
||||||
return;
|
continue;
|
||||||
|
else if (errno == EAGAIN)
|
||||||
|
/* nothing more to read */
|
||||||
|
break;
|
||||||
|
|
||||||
log_error_errno(errno, "failed to receive message: %m");
|
log_error_errno(errno, "failed to receive message: %m");
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user