treewide: make more file descriptors cloexec

Avoid file descriptor leakage into child processes by marking them `O_CLOEXEC`.
This commit is contained in:
Barnabás Pőcze 2025-10-28 20:03:13 +01:00 committed by Wim Taymans
parent 6ef23a1a9a
commit e5b741732d
9 changed files with 9 additions and 9 deletions

View file

@ -143,7 +143,7 @@ int avb_server_make_socket(struct server *server, uint16_t type, const uint8_t m
struct packet_mreq mreq;
struct sockaddr_ll sll;
fd = socket(AF_PACKET, SOCK_RAW|SOCK_NONBLOCK, htons(ETH_P_ALL));
fd = socket(AF_PACKET, SOCK_RAW | SOCK_CLOEXEC | SOCK_NONBLOCK, htons(ETH_P_ALL));
if (fd < 0) {
pw_log_error("socket() failed: %m");
return -errno;