[make-initrd] [PATCH v1 06/11] feature/procacct: Use nonblocking per-call
Alexey Gladkov
gladkov.alexey at gmail.com
Thu Jun 15 20:59:15 MSK 2023
Signed-off-by: Alexey Gladkov <gladkov.alexey at gmail.com>
---
features/debug-procacct/src/procacct.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/features/debug-procacct/src/procacct.c b/features/debug-procacct/src/procacct.c
index 0ff9030f..151a6f2c 100644
--- a/features/debug-procacct/src/procacct.c
+++ b/features/debug-procacct/src/procacct.c
@@ -144,7 +144,7 @@ void setup_netlink_fd(struct fd_handler *el)
{
struct sockaddr_nl local;
- el->fd = socket(AF_NETLINK, SOCK_RAW | SOCK_NONBLOCK | SOCK_CLOEXEC, NETLINK_GENERIC);
+ el->fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC);
if (el->fd < 0)
rd_fatal("error creating Netlink socket: %m");
@@ -361,7 +361,7 @@ int process_netlink_events(struct fd_handler *el)
struct nlattr *na;
errno = 0;
- ret = recv(el->fd, &msg, sizeof(msg), 0);
+ ret = recv(el->fd, &msg, sizeof(msg), MSG_DONTWAIT);
if (ret < 0) {
if (errno == EAGAIN || errno == EWOULDBLOCK)
return 0;
--
2.33.8
More information about the Make-initrd
mailing list