From b502b7ceb03183340bc0bf404507328cef2b454a Mon Sep 17 00:00:00 2001 From: scf Date: Wed, 30 Apr 2008 23:27:02 +0000 Subject: Enable autoflush of output to always show prompts. If piping the output prior to this patch, the prompt would not appear due to buffering. Approved by: flz --- tools/tools/mfc/mfc.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools') diff --git a/tools/tools/mfc/mfc.pl b/tools/tools/mfc/mfc.pl index c862679..18138a8 100644 --- a/tools/tools/mfc/mfc.pl +++ b/tools/tools/mfc/mfc.pl @@ -51,6 +51,7 @@ use warnings; use Env; use Env qw(MFCHOME MFCLOGIN MFCCVSROOT); use Getopt::Std; +use IO::Handle; my $mfchome = $MFCHOME ? $MFCHOME : "/var/tmp/mfc"; my $mfclogin = $MFCLOGIN ? $MFCLOGIN : ""; @@ -77,6 +78,10 @@ my $mfc_func = \&mfc_headers; sub init() { + # Enable autoflush of output to always show prompts. Without this, + # piping output will fail to display a prompt. + autoflush STDOUT 1; + # Look for pre-requisites. my @reqs = ( "fetch", "cvs", "mkdir", "cat", "chmod", "grep" ); my $cmd; -- cgit v1.1