ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ludwig <mil...@gmx.de>
Subject Re: Output of perl exec behaving oddly
Date Mon, 24 Jan 2011 13:25:12 GMT
Laurence Mills-Gahl schrieb am 24.01.2011 um 00:56 (-0500):
> On 1/23/11 10:12 PM, Michael Ludwig wrote:
> > Laurence Mills-Gahl schrieb am 23.01.2011 um 21:27 (-0500):
> >>
> >> I have a list of centerid's and a "foreach" loop
> > Red flag goes up …
> 
> What is the red flag?

Ah, that was just a manner of speaking.

I was on the wrong track, sorry. :-)

> The foreach task (from Ant-Contrib) passes a parameter to the target
> task. The ${centerid} is echoed on the target of the loop and it is
> indeed changing as I would expect it to...

Good - I had overlooked that possibility.

> The script and commandline args are all correct and produce the
> correct result when called from the shell.
> The problem is that calling this from ant produces *inconsistent*
> results. Some of the first report files are written but after two or
> three iterations, the output that should be going to the file is
> turning up in standard output.

> The -d switch does provide lots of detail about what is going on at
> each step and I don't see anything unexpected that would make the
> output of an (apparently) separate process (the perl process) which is
> outside the ant execution space, change from a perl file handle to
> standard out.

Another idea, but off-topic for Ant:

Are you doing proper error checking on calls to open() in your Perl
code?

  open my $fh, '>', $fn or die "open $fn: $!"; # error checking

> Thanks for your help, but I'm still on the hunt for why this is
> happening.

Good luck - someone else might have better ideas!

-- 
Michael Ludwig

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message