Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/trans.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/trans.c')
-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) {