From 123c2fb6745c746bf4005f7d1465fc895c058ce9 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 21 Apr 2005 09:40:03 +0000 Subject: ensure the log is flushed ASAP when using a local file --- perl-install/log.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'perl-install') diff --git a/perl-install/log.pm b/perl-install/log.pm index 2eaecb395..da3c56037 100644 --- a/perl-install/log.pm +++ b/perl-install/log.pm @@ -31,14 +31,16 @@ sub l { } sub openLog { - if ($_[0]) { #- useLocal - open $LOG, "> $_[0]"; + my ($o_file) = @_; + + if ($o_file) { #- useLocal + open $LOG, "> $o_file"; } elsif ($::isInstall) { open $LOG, "> /dev/tty3"; open $LOG2, ">> /tmp/ddebug.log"; - select((select($LOG), $| = 1)[0]); - select((select($LOG2), $| = 1)[0]); } + select((select($LOG), $| = 1)[0]) if $LOG; + select((select($LOG2), $| = 1)[0]) if $LOG2; } sub closeLog() { -- cgit v1.2.1