Make the main log file flush its output on every write. (cmp)

This commit is contained in:
cltbld 2004-11-05 23:17:39 +00:00
Родитель 9afb0af7ac
Коммит 1f86984255
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -24,7 +24,7 @@ use Config; # for $Config{sig_name} and $Config{sig_num}
use File::Find ();
use File::Copy;
$::UtilsVersion = '$Revision: 1.279 $ ';
$::UtilsVersion = '$Revision: 1.280 $ ';
package TinderUtils;
@ -864,6 +864,13 @@ sub BuildIt {
print "Opening $logfile\n";
open LOG, ">$logfile"
or die "Cannot open logfile, $logfile: $?\n";
# Make the log file flush on every write.
my $oldfh = select(LOG);
$| = 1;
select($oldfh);
# Prepend basic information to the log file.
print_log "current dir is -- " . ::hostname() . ":$build_dir\n";
print_log "Build Administrator is $Settings::BuildAdministrator\n";