From: Eric Wong Date: Wed, 30 Sep 2015 21:00:20 +0000 (+0000) Subject: daemon: always autoflush stdout/stderr X-Git-Tag: v1.0.0~820 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=22b943ccee459e2e0d1b52e1f538ad71b9918bbd;p=public-inbox.git daemon: always autoflush stdout/stderr 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. --- 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;