From 22b943ccee459e2e0d1b52e1f538ad71b9918bbd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 30 Sep 2015 21:00:20 +0000 Subject: 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. --- lib/PublicInbox/Daemon.pm | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v1.2.3-24-ge0c7