* [PATCH 2/4] extindex: enable autoflush on STDOUT/STDERR
2020-12-26 10:16 5% [PATCH 0/4] extindex: more fixes and usability things Eric Wong
@ 2020-12-26 10:16 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-12-26 10:16 UTC (permalink / raw)
To: meta
With --watch, the output may be redirected to a pipe or socket
which Perl may decide to buffer. Ensure Perl doesn't buffer
these outputs since they can provide real-time status updates
in response to signals or FS activity.
---
script/public-inbox-extindex | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/script/public-inbox-extindex b/script/public-inbox-extindex
index 607baa3e..17986f60 100644
--- a/script/public-inbox-extindex
+++ b/script/public-inbox-extindex
@@ -33,7 +33,9 @@ GetOptions($opt, qw(verbose|v+ reindex rethread compact|c+ jobs|j=i
or die $help;
if ($opt->{help}) { print $help; exit 0 };
die "--jobs must be >= 0\n" if defined $opt->{jobs} && $opt->{jobs} < 0;
-
+require IO::Handle;
+STDOUT->autoflush(1);
+STDERR->autoflush(1);
# require lazily to speed up --help
my $eidx_dir = shift(@ARGV) // die "E: $help";
local $SIG{USR1} = 'IGNORE'; # to be overridden in eidx_sync
^ permalink raw reply related [relevance 7%]
* [PATCH 0/4] extindex: more fixes and usability things
@ 2020-12-26 10:16 5% Eric Wong
2020-12-26 10:16 7% ` [PATCH 2/4] extindex: enable autoflush on STDOUT/STDERR Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-12-26 10:16 UTC (permalink / raw)
To: meta
--watch seems nice, and "--watch --all" (or just "--all")
without having to specify the pathname of the extindex
is nice, too.
It still needs to write extindex.all.topdir if none is
configured and a section 1 manpage...
Eric Wong (4):
extindex: various --watch signal handling fixes
extindex: enable autoflush on STDOUT/STDERR
extindex: add undocumented --no-scan switch
extindex: allow using --all without EXTINDEX_DIR
lib/PublicInbox/ExtSearchIdx.pm | 18 ++++++++++++++----
script/public-inbox-extindex | 21 +++++++++++++++------
2 files changed, 29 insertions(+), 10 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-12-26 10:16 5% [PATCH 0/4] extindex: more fixes and usability things Eric Wong
2020-12-26 10:16 7% ` [PATCH 2/4] extindex: enable autoflush on STDOUT/STDERR Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).