]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
geoip: set autoflush on stdout
authorJan Engelhardt <jengelh@inai.de>
Sun, 9 Apr 2023 18:55:52 +0000 (20:55 +0200)
committerJan Engelhardt <jengelh@inai.de>
Sun, 9 Apr 2023 18:55:52 +0000 (20:55 +0200)
stderr is _IONBF by default on linux-glibc, but stdout only _IOLBF.
The progress updates do not use newline, so stdout needs to be
switched to _IONBF to appear in a timely fashion.

geoip/xt_geoip_build
geoip/xt_geoip_build_maxmind

index 74a16e8f359341dbef94eb377be82dfa5a401efe..16e105217d6e03e731b74002aa8ebcb910e8c8b2 100755 (executable)
@@ -11,6 +11,7 @@ use Socket qw(AF_INET AF_INET6 inet_pton);
 use warnings;
 use Text::CSV_XS; # or trade for Text::CSV
 use strict;
+$| = 1;
 
 my $csv = Text::CSV_XS->new({
        allow_whitespace => 1,
index 05a726c236de55310647a3e98ec0f602b0ee50d5..5fbdab6750a1f083872f089be2a0545a97097a3f 100755 (executable)
@@ -10,6 +10,7 @@ use Socket qw(AF_INET AF_INET6 inet_pton);
 use warnings;
 use Text::CSV_XS; # or trade for Text::CSV
 use strict;
+$| = 1;
 
 my $csv = Text::CSV_XS->new({
        allow_whitespace => 1,