tree-wide: port users over to use new ERRNO_IS_ACCEPT_AGAIN() call

This commit is contained in:
Lennart Poettering
2019-04-10 22:11:18 +02:00
parent fb0302ddbc
commit 4ff9bc2ea6
10 changed files with 72 additions and 51 deletions
+5 -3
View File
@@ -20,6 +20,7 @@
#include "sd-event.h"
#include "alloc-util.h"
#include "errno-util.h"
#include "fd-util.h"
#include "format-util.h"
#include "io-util.h"
@@ -261,9 +262,10 @@ static int udev_ctrl_event_handler(sd_event_source *s, int fd, uint32_t revents,
sock = accept4(fd, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK);
if (sock < 0) {
if (errno != EINTR)
log_error_errno(errno, "Failed to accept ctrl connection: %m");
return 0;
if (ERRNO_IS_ACCEPT_AGAIN(errno))
return 0;
return log_error_errno(errno, "Failed to accept ctrl connection: %m");
}
/* check peer credential of connection */