On 21 May 2012 17:36, Ted Kremenek <[email protected]> wrote:

> On May 21, 2012, at 5:31 PM, Nick Lewycky <[email protected]> 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
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to