tree-wide: use ERRNO_IS_TRANSIENT()

This commit is contained in:
Yu Watanabe
2021-11-30 23:06:43 +09:00
parent 7aad83580f
commit 8add30a03c
26 changed files with 96 additions and 83 deletions
+8 -7
View File
@@ -4211,14 +4211,15 @@ static int nspawn_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t r
}
n = recvmsg_safe(fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC);
if (IN_SET(n, -EAGAIN, -EINTR))
return 0;
if (n == -EXFULL) {
log_warning("Got message with truncated control data (too many fds sent?), ignoring.");
return 0;
}
if (n < 0)
if (n < 0) {
if (ERRNO_IS_TRANSIENT(n))
return 0;
if (n == -EXFULL) {
log_warning("Got message with truncated control data (too many fds sent?), ignoring.");
return 0;
}
return log_warning_errno(n, "Couldn't read notification socket: %m");
}
cmsg_close_all(&msghdr);