From 338dfeb6d28e2c9f2d67fd48b280f43b24e84677 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Tue, 13 Apr 2010 12:27:12 +0200 Subject: [PATCH] - set close-on-exec for repopage filedescriptor --- src/repopage.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/repopage.c b/src/repopage.c index 1ba8f7f..7f9e21e 100644 --- a/src/repopage.c +++ b/src/repopage.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "repo.h" @@ -779,6 +780,8 @@ repopagestore_read_or_setup_pages(Repopagestore *store, FILE *fp, unsigned int p store->pagefd = dup(fileno(fp)); if (store->pagefd == -1) can_seek = 0; + else + fcntl(store->pagefd, F_SETFD, FD_CLOEXEC); #ifdef DEBUG_PAGING fprintf(stderr, "can %sseek\n", can_seek ? "" : "NOT "); -- 2.7.4