Title: RE: Stopping java processes started with ant

Hi Dave,
        It is very simple stuff. I use wrapper scripts that write the server pid to a file, and then later a script that reads the pid and kills the associated process.

        Works fine on Solaris, may work on Windows with cygwin but I have not tested.

Enjoy,
 - Nascif

> -----Original Message-----
> From: David Colton (ext. 799) [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 17, 2002 2:39 AM
> To: 'Ant Users List'
> Subject: RE: Stopping java processes started with ant
>
>
> Nascif.
>
> Could you share this please. I was about to start work on the
> same solution.
>
> Thanks.
>
> Dave.
>
> -----Original Message-----
> From: Nascif Abousalh-Neto [mailto:[EMAIL PROTECTED]]
> Sent: 16 October 2002 17:38
> To: Klara Ward; Ant Users List
> Subject: RE: Stopping java processes started with ant
>
>
> Hi Klara,
>       I did some research on this area, even sent a post to
> this mailing list (that got no replies). The trick would be
> exposing somehow the Java Process object used internally by
> the java (or exec) task. Maybe as an Ant data structure. I
> considered extending the exec task to add the Process
> instance to a static data structure so that other tasks
> (running in under a <parallel> task) could later retrieve it
> to call the destroy() method. But in the end I'm wrapping the
> process I call this way in a script that writes the process
> pid to a file. Later another task runs a script that reads
> the pid from the file and issues a "kill" command to stop the
> process. Not very elegant, but has been working fine so far.
>
>       Regards,
>               Nascif
>
>
> **************************************************************
> ************
> The information contained in this e-mail is confidential,
> may be privileged and is intended only for the use of the
> recipient named above. If you are not the intended recipient
> or a representative of the intended recipient, you have
> received this e-mail in error and must not copy, use or
> disclose the contents of this email to anybody else. If you
> have received this e-mail in error, please notify the sender
> immediately by return e-mail and permanently delete the copy
> you received. This email has been swept for computer viruses.
> However, you should carry out your own virus checks.
>
>
> Registered in Ireland, No. 205721. http://www.FINEOS.com
> **************************************************************
> ************
>
>

 

Attachment: start-tnameserv
Description: Binary data

Attachment: kill-server
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@;jakarta.apache.org>


Reply via email to