]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc: flush after each command in batch mode
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 8 Aug 2018 16:23:48 +0000 (09:23 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 8 Aug 2018 16:23:48 +0000 (09:23 -0700)
After each command flush output.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/tc.c

diff --git a/tc/tc.c b/tc/tc.c
index 62d54186ec667dab8c91281184ccc720b30dcef7..3bb5910ffac5276a924fc4063ecaa5ac6cd8ad43 100644 (file)
--- a/tc/tc.c
+++ b/tc/tc.c
@@ -402,6 +402,7 @@ static int batch(const char *name)
 
                err = do_cmd(largc, largv, tail == NULL ? NULL : tail->buf,
                             tail == NULL ? 0 : sizeof(tail->buf));
+               fflush(stdout);
                if (err != 0) {
                        fprintf(stderr, "Command failed %s:%d\n", name,
                                cmdlineno - 1);