summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index b879afcb..91b40a16 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -556,7 +556,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
}
/* save the cwd so we can restore it later */
- OPEN(cwdfd, ".", O_RDONLY);
+ OPEN(cwdfd, ".", O_RDONLY | O_CLOEXEC);
if(cwdfd < 0) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not get current working directory\n"));
}