ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: Waiting for <exec> task to succeed
Date Fri, 25 May 2007 03:12:38 GMT
Why not write a shell script and then have the shell script execute
the loop? All the <exec> task would have to do is execute the shell
script. The shell script can return a non-zero exit code on failure.

On 5/24/07, Krish <akm_cygnus@yahoo.co.in> wrote:
> Hi
>
> I have a requirement wherein I need to make sure the
> process doesnt exist. So I need to do something like
> this -
>
> `netstat -tln | grep 8080 | cut -f1 -d'.
>
> If the return value of the above is tcp, then i know
> that a process is running ..... I need to run this
> command in a loop until the process dies out. Right
> now, there is no way of knowing how long it takes for
> the process to die (1 min or 2 min etc)....Also i
> looked at <exec> task, but there is no way of placing
> this task in a conditional loop. Or if there is way, I
> am not sure how to proceed.
>
> I also looked at <waitFor> but I cannot use <waitFor>
> and <exec> together.
>
>
> Let me know how to proceed with this.
>
> Thanks
> K
>
> _____________________________________________________
> *Half of being smart is knowing what you're dumb at
> *To err is human--and to blame it on a computer is even more so
> *Gravity is not responsible for people falling in love
>
>
>       Did you know? You can CHAT without downloading messenger. Click here http://in.messenger.yahoo.com/webmessengerpromo.php
>
> ---------------------------------------------------------------------
> 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