ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Re: <exec> hang up even inputstring=""
Date Mon, 11 May 2009 15:14:48 GMT
The only solution is not to call an <exec> that waits for input when
that input won't be happening. Otherwise, the <exec> task won't time
out.

I guess the question is what are you trying to do with the <exec>
task, and is there another way around this without necessarily waiting
for input. What does the "radia.bat" program do? Why do you specify a
blank input string? If there is no need for an input string, why not
simply leave out that attribute to the <exec> task?

On Mon, May 11, 2009 at 2:54 AM, coonay <coonay@yahoo.com> wrote:
>
> do you know there is a fix to thist problem?
> or do u honw if there is a workaround existed?
> Any help is highly apprecitated.
>
> David Weintraub wrote:
>>
>> I see this is on a Windows system. Windows doesn't do process forking.
>> It throws off a thread using the CreateProcess call. It's very similar
>> to forking, but not quite. If the created thread is waiting for input,
>> and the CreateProcess call was told to wait for input, everything
>> freezes, and the timeout value for the <exec> task simply never gets a
>> chance to timeout.
>>
>> I know I've had similar problems with Perl scripts running under Ant
>> on Windows systems. What works for Unix/Linux simply doesn't work the
>> same way on Windows.
>>
>>
>> On Fri, May 8, 2009 at 5:41 AM, coonay <coonay@yahoo.com> wrote:
>>>
>>> the ant will be hang up even the inputstring=""  and timeouted
>>>
>>>
>>> <target  name="cmd" >
>>>      <echo message="PSEXEC is running..."/>
>>>          <!--
>>>          <exec executable="cmd" dir="." os="Windows_NT" inputstring="">
>>>          -->
>>>          <exec executable="cmd" dir="." inputstring="" timeout="10000">
>>>            <arg value="/c"/>
>>>        <arg value="radia.bat"/>
>>>        <arg line="\\${RHOST}  -realtime -u ${USER} -p ${PASSWORD} ${CMD}
>>> ${ARG}"/>
>>>        <env key="RHOST" value="${RHOST}"/>
>>>    </exec>
>>>
>>>  </target>
>>>
>>> -----
>>> http://coonay2010expo.blogspot.com/ http:coonay
>>> --
>>> View this message in context:
>>> http://www.nabble.com/%3Cexec%3E-hang-up-even-inputstring%3D%22%22-tp23443019p23443019.html
>>> Sent from the Ant - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: user-help@ant.apache.org
>>>
>>>
>>
>>
>>
>> --
>> David Weintraub
>> qazwart@gmail.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>>
>
>
> -----
> http://coonay2010expo.blogspot.com/ http:coonay
> --
> View this message in context: http://www.nabble.com/%3Cexec%3E-hang-up-even-inputstring%3D%22%22-tp23443019p23478006.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
David Weintraub
qazwart@gmail.com

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


Mime
View raw message