mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-06 06:46:29 -04:00
treewide: make more file descriptors cloexec
Avoid file descriptor leakage into child processes by marking them `O_CLOEXEC`.
This commit is contained in:
parent
8344117e7b
commit
ccfb61efa4
9 changed files with 11 additions and 11 deletions
|
|
@ -548,7 +548,7 @@ static int setup_socket(struct state *state)
|
|||
struct ifreq req;
|
||||
struct props *p = &state->props;
|
||||
|
||||
fd = socket(AF_PACKET, SOCK_DGRAM|SOCK_NONBLOCK, htons(ETH_P_TSN));
|
||||
fd = socket(AF_PACKET, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, htons(ETH_P_TSN));
|
||||
if (fd < 0) {
|
||||
spa_log_error(state->log, "socket() failed: %m");
|
||||
return -errno;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue