1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-03 12:06:34 +00:00

Apply FD_CLOEXEC to FDs of message queuing socketpair

This commit is contained in:
Gerhard Rieger 2023-06-12 12:23:37 +02:00
parent 8539e6e887
commit 80f4aa8bcd
2 changed files with 5 additions and 0 deletions

View file

@ -119,6 +119,8 @@ static int diag_sock_pair(void) {
diag_sock_recv = -1;
return -1;
}
fcntl(handlersocks[0], F_SETFD, FD_CLOEXEC);
fcntl(handlersocks[1], F_SETFD, FD_CLOEXEC);
diag_sock_send = handlersocks[1];
diag_sock_recv = handlersocks[0];
#if !defined(MSG_DONTWAIT)