summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-12-29 01:49:06 +0100
committerTom Gundersen <teg@jklm.no>2014-12-29 01:59:49 +0100
commit0b2bbbdf2f77d685a12862b96e764ac5f1ef8046 (patch)
tree89961e78272d5fae9217a812f521bbb297114bc3
parent2263bb9a92f25571f837700cfee4fb79721baf46 (diff)
sd-rtnl: recv_message - don't fail on interrupt
We should just try again instead.
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index cfb2af3142..92f318267e 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -1348,8 +1348,10 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool
/* no data */
if (errno == ENOBUFS)
log_debug("rtnl: kernel receive buffer overrun");
+ else if (errno == EAGAIN)
+ log_debug("rtnl: no data in socket");
- return (errno == EAGAIN) ? 0 : -errno;
+ return (errno == EAGAIN || errno == EINTR) ? 0 : -errno;
} else if (r == 0)
/* connection was closed by the kernel */
return -ECONNRESET;