aboutsummaryrefslogtreecommitdiff
path: root/lib/libfetch/common.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2011-05-13 07:21:41 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2011-05-13 07:21:41 +0000
commit15b68c63bb0acb05ad27aeeedb167cfad820e0cf (patch)
tree08dfd8f2074bf1e9a290755f2e8e5876c4ceebf8 /lib/libfetch/common.c
parent3d08a76bbc15511d93dec139ce42ceb6a4746ba1 (diff)
Notes
Diffstat (limited to 'lib/libfetch/common.c')
-rw-r--r--lib/libfetch/common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c
index ff10d27b419e..fefc4c5defd6 100644
--- a/lib/libfetch/common.c
+++ b/lib/libfetch/common.c
@@ -213,6 +213,7 @@ fetch_reopen(int sd)
/* allocate and fill connection structure */
if ((conn = calloc(1, sizeof(*conn))) == NULL)
return (NULL);
+ fcntl(sd, F_SETFD, FD_CLOEXEC);
conn->sd = sd;
++conn->ref;
return (conn);