]> git.ktnx.net Git - mpd-feeder.git/commitdiff
set autoflush on stderr so that logging to systemd's journal (via UNIX socket) is...
authorDamyan Ivanov <dmn@debian.org>
Fri, 26 Nov 2021 12:00:16 +0000 (12:00 +0000)
committerDamyan Ivanov <dmn@debian.org>
Fri, 26 Nov 2021 12:00:16 +0000 (12:00 +0000)
bin/mpd-feeder

index ffb7994e2db793f5a42a3daae7f4a1714044bbf2..29a6d5b10f6247f2bf6e9ee54e65ae96f8e16605 100755 (executable)
@@ -8,6 +8,12 @@ use App::MPD::Feeder;
 use Log::Any qw($log);
 use Log::Any::Adapter Stderr => log_level => 'error';
 
+{   # autoflush without IO::Handle
+    my $fh = select STDERR;
+    $| = 1;
+    select $fh;
+}
+
 my $feeder = App::MPD::Feeder->new();
 
 if (@ARGV) {