diff options
author | Henrik Nordstrom <henrik@henriknordstrom.net> | 2008-05-12 20:51:45 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-05-12 20:51:45 +0200 |
commit | d213760d4ffb5d2c45e024783741b4b191b91a74 (patch) | |
tree | 508d6a5b964b82133cae4cb1dfbd7886469cd079 /iptables-restore.c | |
parent | ac21a5cb811dad7928c34534cae24427068dd440 (diff) |
Make iptables-restore usable over a pipe
The attached patch flushes stdout between commands to make output
operations (-L etc) in iptables-restore usable over a pipe. stdio by
defaut buffers output if not connected to a terminal.
Henrik Nordstrom <henrik@henriknordstrom.net>
Diffstat (limited to 'iptables-restore.c')
-rw-r--r-- | iptables-restore.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/iptables-restore.c b/iptables-restore.c index ee3ba455..879683c5 100644 --- a/iptables-restore.c +++ b/iptables-restore.c @@ -442,6 +442,7 @@ main(int argc, char *argv[]) &newargv[2], &handle); free_argv(); + fflush(stdout); } if (tablename && (strcmp(tablename, curtable) != 0)) continue; |