modules: add SOCK_CLOEXEC to all socket() calls

This commit is contained in:
Daniel Eklöf 2022-03-29 18:21:13 +02:00
parent 3ff1c95208
commit 4bb81e8940
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 5 additions and 5 deletions

View file

@ -621,7 +621,7 @@ run(struct module *mod)
if (!i3_get_socket_address(&addr))
return 1;
int sock = socket(AF_UNIX, SOCK_STREAM, 0);
int sock = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
if (sock == -1) {
LOG_ERRNO("failed to create UNIX socket");
return 1;