X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bin%2Fwanna-build-statistics;h=6719306c8e76e9cb0b741dd2aaa82d9cd8313357;hb=d38cebee71c4d472d45c09c580c064ae52e12f47;hp=3d7b0d10b070e2e31ba148abc258d59294d30c16;hpb=927c694fa27e6648d8d0770c5e29a66c7ec306c3;p=wannabuild.git diff --git a/bin/wanna-build-statistics b/bin/wanna-build-statistics index 3d7b0d1..6719306 100755 --- a/bin/wanna-build-statistics +++ b/bin/wanna-build-statistics @@ -69,9 +69,9 @@ while( @ARGV && $ARGV[0] =~ /^-/ ) { } my($lastmsg, %n_state, $total, %n_builder); -open( PIPE, "wanna-build --database=$database --dist=$dist --list=all 2>&1 |" ) +open( my $pipe, '-|', "wanna-build --database=$database --dist=$dist --list=all 2>&1" ) or die "Cannot spawn wanna-build: $!\n"; -while( ) { +while( <$pipe> ) { if (/^Database for $dist doesn't exist$/) { exit 1; } @@ -86,7 +86,7 @@ while( ) { } $lastmsg = $_; } -close( PIPE ); +close( $pipe ); if ($?) { print "$lastmsg"; die "Bad exit status $? from wanna-build\n";