diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-02-12 01:28:35 +0100 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2009-02-12 07:15:07 +0100 |
commit | c19f880d8aac7c0372381e29d7cea09accd0db26 (patch) | |
tree | cd2360ee889a96550aa2fd343174fb936f7ab854 /xtables.c | |
parent | 37b4bde745698bf140d74e59a2561f34deeb8726 (diff) |
libxtables: flush before fork
Reference: http://bugs.debian.org/514869
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'xtables.c')
-rw-r--r-- | xtables.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |