From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id CA3B3201C1 for ; Wed, 30 Sep 2015 21:00:30 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 05/12] daemon: always autoflush stdout/stderr Date: Wed, 30 Sep 2015 21:00:20 +0000 Message-Id: <20150930210027.30479-6-e@80x24.org> In-Reply-To: <20150930210027.30479-1-e@80x24.org> References: <20150930210027.30479-1-e@80x24.org> List-Id: 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 9e177f2..02d2dc5 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; -- EW