summaryrefslogtreecommitdiff
path: root/idle.c
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-10 23:18:03 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-10 23:18:03 +0200
commit6adb89c30c9e876848fa84774674db0fd05dad8d (patch)
treea021d898bb72be98ab65869112b08b2172ad7e6b /idle.c
parent1a3611151af25d4cf74ce1042cfe8b16fc85f3cb (diff)
Make all sockets close-on-exec
Diffstat (limited to 'idle.c')
-rw-r--r--idle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/idle.c b/idle.c
index 03d9f88..46be539 100644
--- a/idle.c
+++ b/idle.c
@@ -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;