summaryrefslogtreecommitdiff
path: root/lib/libfetch/file.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/file.c
parent3d08a76bbc15511d93dec139ce42ceb6a4746ba1 (diff)
Notes
Diffstat (limited to 'lib/libfetch/file.c')
-rw-r--r--lib/libfetch/file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libfetch/file.c b/lib/libfetch/file.c
index a1492ba05637..dffaad8278fb 100644
--- a/lib/libfetch/file.c
+++ b/lib/libfetch/file.c
@@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$");
#include <sys/stat.h>
#include <dirent.h>
+#include <fcntl.h>
#include <stdio.h>
#include <string.h>
@@ -57,6 +58,7 @@ fetchXGetFile(struct url *u, struct url_stat *us, const char *flags)
fetch_syserr();
}
+ fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
return (f);
}
@@ -84,6 +86,7 @@ fetchPutFile(struct url *u, const char *flags)
fetch_syserr();
}
+ fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
return (f);
}