summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-04-21 09:40:03 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-04-21 09:40:03 +0000
commit123c2fb6745c746bf4005f7d1465fc895c058ce9 (patch)
tree2a77a3d11fe6b1a2e9eab77ec437ad7b217f559f
parentdf04942bb4543d6b50c10513cb7b98d966605e05 (diff)
downloaddrakx-backup-do-not-use-123c2fb6745c746bf4005f7d1465fc895c058ce9.tar
drakx-backup-do-not-use-123c2fb6745c746bf4005f7d1465fc895c058ce9.tar.gz
drakx-backup-do-not-use-123c2fb6745c746bf4005f7d1465fc895c058ce9.tar.bz2
drakx-backup-do-not-use-123c2fb6745c746bf4005f7d1465fc895c058ce9.tar.xz
drakx-backup-do-not-use-123c2fb6745c746bf4005f7d1465fc895c058ce9.zip
ensure the log is flushed ASAP when using a local file
-rw-r--r--perl-install/log.pm10
1 files changed, 6 insertions, 4 deletions
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() {