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
parent 8344117e7b
commit ccfb61efa4
9 changed files with 11 additions and 11 deletions

View file

@ -880,7 +880,7 @@ static int send_sap(struct impl *impl, struct session *sess, bool bye)
if ((str = pw_properties_get(sess->props, "source.ip")) == NULL) {
if (impl->ifname) {
int fd = socket(impl->sap_addr.ss_family, SOCK_DGRAM, 0);
int fd = socket(impl->sap_addr.ss_family, SOCK_DGRAM | SOCK_CLOEXEC, 0);
if (fd >= 0) {
struct ifreq req;
spa_zero(req);