summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/trans.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 4b831193..ae01e3fa 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -511,6 +511,9 @@ int _alpm_runscriptlet(const char *root, const char *installfn,
}
_alpm_log(PM_LOG_DEBUG, "%s\n", cmdline);
+ /* Flush open fds before fork() to avoid cloning buffers */
+ fflush(NULL);
+
/* fork- parent and child each have seperate code blocks below */
pid = fork();
if(pid == -1) {