about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-09-30 21:00:20 +0000
committerEric Wong <e@80x24.org>2015-09-30 21:09:18 +0000
commit22b943ccee459e2e0d1b52e1f538ad71b9918bbd (patch)
tree20e9c13c89cc45b15e7e14509ce2839eb8638e57 /lib
parent709a1979302ef5dbb40babb84821b079868490a1 (diff)
downloadpublic-inbox-22b943ccee459e2e0d1b52e1f538ad71b9918bbd.tar.gz
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/Daemon.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm
index 9e177f2e..02d2dc5d 100644
--- a/lib/PublicInbox/Daemon.pm
+++ b/lib/PublicInbox/Daemon.pm
@@ -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;