]> Sergey Matveev's repositories - public-inbox.git/commit
lei: avoid close(STD{IN,OUT,ERR}) in oneshot mode
authorEric Wong <e@80x24.org>
Wed, 28 Apr 2021 19:37:29 +0000 (19:37 +0000)
committerEric Wong <e@80x24.org>
Wed, 28 Apr 2021 19:47:29 +0000 (19:47 +0000)
commit08b649735a94af6a5385df3b78092e5818408df1
tree5e7c9784b25d13a7fa8a8dbec5e3397ef2ff7a69
parent8e82fad7b32ab5a985a3ea4b5fbd01fd32ef0153
lei: avoid close(STD{IN,OUT,ERR}) in oneshot mode

This seems to fix the occasional "make check-run" failures I've
been chasing.

Some parts of our code assumes we can close($lei->{1})
and similar, which causes IO::Handle::autoflush to behave
badly when STDOUT is the "select"-ed FH of the Perl process.
Since oneshot mode is (hopefully) the uncommon case, we'll
just accept the cost of extra FDs and minimize differences
between lei in oneshot vs daemon mode.
lib/PublicInbox/LEI.pm
t/lei.t