From a147b181aca3cdbfa634a03f739efb15e2d078c0 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Mon, 12 May 2008 18:51:45 +0000 Subject: [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 --- iptables-restore.c | 1 + 1 file changed, 1 insertion(+) (limited to 'iptables-restore.c') diff --git a/iptables-restore.c b/iptables-restore.c index ee3ba45..879683c 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; -- cgit v1.2.3