]> Sergey Matveev's repositories - public-inbox.git/commitdiff
daemon: always autoflush stdout/stderr
authorEric Wong <e@80x24.org>
Wed, 30 Sep 2015 21:00:20 +0000 (21:00 +0000)
committerEric Wong <e@80x24.org>
Wed, 30 Sep 2015 21:09:18 +0000 (21:09 +0000)
Users may log output to a pipe, so ensure these outputs are
unbuffered in userspace and go to the operating system ASAP
for other processes to pick up.

lib/PublicInbox/Daemon.pm

index 9e177f2eb39bff8b0c9d47b8ad63e6b05b28e6a9..02d2dc5dd0659cc02875c644ddf7c1e0a3303c12 100644 (file)
@@ -8,6 +8,9 @@ package main;
 use strict;
 use warnings;
 use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
+use IO::Handle;
+STDOUT->autoflush(1);
+STDERR->autoflush(1);
 require Danga::Socket;
 require POSIX;
 require PublicInbox::Listener;