diff options
author | /C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net> | 2008-05-12 18:51:45 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net> | 2008-05-12 18:51:45 +0000 |
commit | a147b181aca3cdbfa634a03f739efb15e2d078c0 (patch) | |
tree | 508d6a5b964b82133cae4cb1dfbd7886469cd079 /ip6tables-restore.c | |
parent | d3ba273245cf654464bb5fa5255a45fe07b3252b (diff) |
[patch 1/4] 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 'ip6tables-restore.c')
-rw-r--r-- | ip6tables-restore.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ip6tables-restore.c b/ip6tables-restore.c index 6e41d51..9f6108a 100644 --- a/ip6tables-restore.c +++ b/ip6tables-restore.c @@ -436,6 +436,7 @@ int main(int argc, char *argv[]) &newargv[2], &handle); free_argv(); + fflush(stdout); } if (!ret) { fprintf(stderr, "%s: line %u failed\n", |