[cfe-commits] r157219 - /cfe/trunk/utils/analyzer/reducer.pl
Nick Lewycky
nlewycky at google.com
Mon May 21 17:46:49 PDT 2012
On 21 May 2012 17:36, Ted Kremenek <kremenek at apple.com> wrote:
> On May 21, 2012, at 5:31 PM, Nick Lewycky <nlewycky at google.com> wrote:
>
> +#!/usr/bin/perl -w
>> +use strict;
>> +my \$BAD = 1;
>> +my \$GOOD = 0;
>> +`rm -f $reduceOut`;
>> +my \$command = "$commandStr > $reduceOut 2>&1";
>> +system(\$command);
>> +open(IN, "$reduceOut") or exit(\$BAD);
>>
>
> open(IN, "$command|") or exit(\$BAD);
>
>
>
> That's not quite the same. That doesn't capture both stdout and stderr.
>
Good point. That can be fixed by changing to "my $command = $commandStr
2>&1" can't it? Something like this:
open(IN, "$commandStr 2>&1 |") or die $BAD;
or were you trying to keep stdout and stderr output separate? Your current
command doesn't.
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120521/93b612c6/attachment.html>
More information about the cfe-commits
mailing list