summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorscf <scf@FreeBSD.org>2008-04-30 23:27:02 +0000
committerscf <scf@FreeBSD.org>2008-04-30 23:27:02 +0000
commitb502b7ceb03183340bc0bf404507328cef2b454a (patch)
treedca4dbeadba2c5f8e1f406a795f1829f63c6502e /tools
parent7db99d1cdd43982226fb5b40e15ede56cc1712be (diff)
downloadFreeBSD-src-b502b7ceb03183340bc0bf404507328cef2b454a.zip
FreeBSD-src-b502b7ceb03183340bc0bf404507328cef2b454a.tar.gz
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
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/mfc/mfc.pl5
1 files changed, 5 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud