diff options
-rw-r--r-- | announce.c | 2 | ||||
-rw-r--r-- | ctest.c | 2 | ||||
-rw-r--r-- | idle.c | 2 | ||||
-rw-r--r-- | proxy.c | 2 | ||||
-rw-r--r-- | rcon.c | 2 | ||||
-rw-r--r-- | server.c | 2 | ||||
-rw-r--r-- | stest.c | 2 |
7 files changed, 7 insertions, 7 deletions
@@ -173,7 +173,7 @@ announce_init(struct cfg *cfg) if (afd < 0) perrordie("timerfd_create"); - sfd = socket(AF_INET, SOCK_DGRAM, 0); + sfd = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0); if (sfd < 0) perrordie("socket"); @@ -27,7 +27,7 @@ main(int argc, char **argv) { exit(EXIT_FAILURE); } - sfd = socket(AF_INET, SOCK_STREAM, 0); + sfd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); if (sfd < 0) { perror("socket"); exit(EXIT_FAILURE); @@ -357,7 +357,7 @@ again: fprintf(stderr, "%s: attempting idle check on %s (len %u)\n", scfg->name, idle->remotestr, idle->remote.addrlen); - sfd = socket(idle->remote.storage.ss_family, SOCK_STREAM, 0); + sfd = socket(idle->remote.storage.ss_family, SOCK_STREAM | SOCK_CLOEXEC, 0); if (sfd < 0) { perror("socket"); goto again; @@ -230,7 +230,7 @@ again: fprintf(stderr, "%s: attempting proxy connection to %s (len %u)\n", scfg->name, proxy->serverstr, proxy->server.addrlen); - sfd = socket(proxy->server.storage.ss_family, SOCK_STREAM, 0); + sfd = socket(proxy->server.storage.ss_family, SOCK_STREAM | SOCK_CLOEXEC, 0); if (sfd < 0) { perror("socket"); goto again; @@ -366,7 +366,7 @@ again: fprintf(stderr, "%s: attempting rcon connection to %s (len %u)\n", scfg->name, rcon->rconstr, rcon->rcon.addrlen); - sfd = socket(rcon->rcon.storage.ss_family, SOCK_STREAM, 0); + sfd = socket(rcon->rcon.storage.ss_family, SOCK_STREAM | SOCK_CLOEXEC, 0); if (sfd < 0) { perror("socket"); goto again; @@ -215,7 +215,7 @@ server_local_open(struct cfg *cfg, struct server *scfg, struct server_local *loc int enable = 1; int r; - sfd = socket(local->addr.storage.ss_family, SOCK_STREAM, 0); + sfd = socket(local->addr.storage.ss_family, SOCK_STREAM | SOCK_CLOEXEC, 0); if (sfd < 0) { perror("socket"); goto out; @@ -30,7 +30,7 @@ main(int argc, char **argv) { exit(EXIT_FAILURE); } - sfd = socket(AF_INET, SOCK_STREAM, 0); + sfd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); if (sfd < 0) { perror("socket"); exit(EXIT_FAILURE); |