summaryrefslogtreecommitdiff
path: root/src/archive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/archive.c')
-rw-r--r--src/archive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/archive.c b/src/archive.c
index 2df93d9..e7260b6 100644
--- a/src/archive.c
+++ b/src/archive.c
@@ -355,7 +355,7 @@ int apk_archive_entry_extract(int atfd, const struct apk_file_info *ae,
break;
case S_IFREG:
if (ae->link_target == NULL) {
- int flags = O_RDWR | O_CREAT | O_TRUNC;
+ int flags = O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC;
fd = openat(atfd, fn, flags, ae->mode & 07777);
if (fd < 0) {