diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2003-09-03 21:20:20 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-09-03 16:42:24 +0000 |
commit | 110e9861451a03f252fceb782271c09d1527ec59 (patch) | |
tree | 374718d6a1b2dbb255f88a3c910036f93cdb3323 /Porting | |
parent | 14bb0a9a08468b34d6bd39a990c2bd5d097cab1f (diff) | |
download | perl-110e9861451a03f252fceb782271c09d1527ec59.tar.gz |
fix: output from different pids
From: "Marcus Holland-Moritz" <mhx-perl@gmx.net>
Message-ID: <005901c3723f$a7914f10$0c2f1fac@R2D2>
p4raw-id: //depot/perl@21022
Diffstat (limited to 'Porting')
-rw-r--r-- | Porting/valgrindpp.pl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Porting/valgrindpp.pl b/Porting/valgrindpp.pl index 1e7c1f8d78..5078734dfb 100644 --- a/Porting/valgrindpp.pl +++ b/Porting/valgrindpp.pl @@ -196,8 +196,16 @@ sub filter { debug(1, "processing $test ($_)\n"); # Get all the valgrind output lines - my @l = map { chomp; s/^==\d+==\s?//; $_ } - do { my $fh = new IO::File $_ or die "$0: cannot open $_ ($!)\n"; <$fh> }; + my @l = do { + my $fh = new IO::File $_ or die "$0: cannot open $_ ($!)\n"; + # Process outputs can interrupt each other, so sort by pid first + my %pid; local $_; + while (<$fh>) { + chomp; + s/^==(\d+)==\s?// and push @{$pid{$1}}, $_; + } + map @$_, values %pid; + }; # Setup some useful regexes my $hexaddr = '0x[[:xdigit:]]+'; |