libxtables: flush before fork

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 80b192ec65bac9c8c64ac56f0b11ddda3a5dd661
Author: Jan Engelhardt <jengelh@xxxxxxxxxx>
Date:   Thu Feb 12 01:28:35 2009 +0100

libxtables: flush before fork

Reference: http://bugs.debian.org/514869
Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxx>
---
 xtables.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/xtables.c b/xtables.c
index 02bfc17..d85e639 100644
--- a/xtables.c
+++ b/xtables.c
@@ -272,6 +272,12 @@ int xtables_insmod(const char *modname, const char *modprobe, bool quiet)
 		modprobe = buf;
 	}
 
+	/*
+	 * Need to flush the buffer, or the child may output it again
+	 * when switching the program thru execv.
+	 */
+	fflush(stdout);
+
 	switch (fork()) {
 	case 0:
 		argv[0] = (char *)modprobe;
-- 
# Created with git-export-patch

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux