Merge pull request #44 from karenetheridge/topic/flush_stdout

ensure stdout is flushed immediately during pretty_print
This commit is contained in:
SymKat 2013-04-29 14:47:02 -07:00
commit ecb13a08e8
2 changed files with 2 additions and 0 deletions

View file

@ -5,6 +5,7 @@
every second if the daemon has terminated rather than waiting for the every second if the daemon has terminated rather than waiting for the
full kill_timeout duration full kill_timeout duration
* new option: prereq_no_process * new option: prereq_no_process
* stdout is flushed immediately when diagnostic output is printed
0.001000 2013-02-26 SymKat <symkat@symkat.com> 0.001000 2013-02-26 SymKat <symkat@symkat.com>
* fixed a warning on "uninitialized value $called_with in substitution" * fixed a warning on "uninitialized value $called_with in substitution"

View file

@ -352,6 +352,7 @@ sub pretty_print {
$color ||= "green"; # Green is no color. $color ||= "green"; # Green is no color.
my $code = $self->color_map->{$color} ||= "32"; # Green is invalid. my $code = $self->color_map->{$color} ||= "32"; # Green is invalid.
local $| = 1;
printf( "%-49s %30s\n", $self->name, "\033[$code" ."m[$message]\033[0m" ); printf( "%-49s %30s\n", $self->name, "\033[$code" ."m[$message]\033[0m" );
} }