mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 08:15:40 +02:00
modules: add SOCK_CLOEXEC to all socket() calls
This commit is contained in:
parent
3ff1c95208
commit
4bb81e8940
4 changed files with 5 additions and 5 deletions
|
@ -223,7 +223,7 @@ wait_for_socket_create(const struct module *mod)
|
|||
struct stat st;
|
||||
if (stat(m->host, &st) == 0 && S_ISSOCK(st.st_mode)) {
|
||||
|
||||
int s = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
int s = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
|
||||
|
||||
struct sockaddr_un addr = {.sun_family = AF_UNIX};
|
||||
strncpy(addr.sun_path, m->host, sizeof(addr.sun_path) - 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue