From 6adb89c30c9e876848fa84774674db0fd05dad8d Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Wed, 10 Jun 2020 23:18:03 +0200 Subject: Make all sockets close-on-exec --- idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'idle.c') 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; -- cgit v1.2.3