X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bin%2Fwb-graph;h=fb326e8e433edc62fdf3402e895f27ae53bcba3b;hb=4572e2d58812a9c5f422a8c2e2401c441d528bb;hp=2a952d004b2374ef05cbc525c459917cf5d8e1a9;hpb=185e4f130080855a0d8728a8d28f0c7720742620;p=wannabuild.git diff --git a/bin/wb-graph b/bin/wb-graph index 2a952d0..fb326e8 100755 --- a/bin/wb-graph +++ b/bin/wb-graph @@ -43,9 +43,9 @@ foreach $arch (@archs) { my($lastmsg, %n_state, $total, %n_builder, $pu_total); $pu_total = 0; $n_state{"Installed"} = 0; -open( PIPE, "wanna-build --database=$arch/build-db --dist=$dist --list=all |" ) +open( my $pipe, '-|', "wanna-build --database=$arch/build-db --dist=$dist --list=all" ) or die "Cannot spawn wanna-build: $!\n"; -while( ) { +while( <$pipe> ) { if (/^Database for $dist doesn't exist$/) { last; } @@ -64,7 +64,7 @@ while( ) { } $lastmsg = $_; } -close( PIPE ); +close( $pipe ); if ($?) { print ", 0, 0"; } else {