ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralf Hauser <>
Subject how to catch stderr in an exec statement?
Date Mon, 21 Oct 2002 16:05:22 GMT
Diane kindly helped me to construct a foreach statement to tame m4 
     <exec executable="m4" output="${macro_proc.out}">
         <arg value="-P"/>
         <arg value="${}.m4"/>
That works fine if no error is present in the exec's input files.
If anything goes wrong within exec, I get only
[exec] Result: 1
or if it is trying to get input (from stdin?) and apparently hangs, 
after Ctrl-C, it get
[exec] Result: 66048
but not the useful stderr output such as
  NONE:0: m4: ERROR: EOF in string
any idea how I can convince ant (at least in the <Result: 1> case) to 
share with the user what the exec sent to stderr?

Thanks Ralf

P.S. The man page doesn't say 

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message