diff options
Diffstat (limited to 'lib/libfetch/common.c')
-rw-r--r-- | lib/libfetch/common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index ff10d27..fefc4c5 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); |