|
Posted by Morten Guldager on January 27, 2007, 2:58 am
Please log in for more thread options
2007-01-26 g4173c@motorola.com wrote
> Greetings:
>
> I'm doing the following:
>
> system ("make | tee /tmp/make.log") == 0 || die "Make failed $?\n";
>
> The problem is that the pipe tee is what is getting returned for a
> status. Is there anyway around this problem? The make fails but my
> script doesn't exit out....
How about launching your "make" in a open call?
open MAKE, "make|" or die "open: $!";
while (<MAKE>)
{
print STDERR $_;
}
my $exit_code_from_make = close MAKE;
/Morten %-)
|