ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ninju Bohra <>
Subject Re: How to stop process using exec?
Date Mon, 30 May 2005 03:46:24 GMT
Windows does not come with a "kill" utility by
default.  There is a "kill" utility in the NT resource
kit (which useable on OSes above NT).  There is also a
enhanced PSKill utility from SysInternals
( which you can use.

The hardest part of killing a process (regardless of
the OS) is determining someway to indentify the proces
to the "kill" program.  The PID (process ID) is
usually the most exact way, however it difficult to
obtain the PID externally.  Some "kill" program
(PSKill for example) can also take the process name.

I would highly recommend NOT using the OS to kill a
process.  OS killing of process is a very messy deal
(particulary on Windows) which can result in resource
leakage, Protection faults and Process Termination
Dialog boxes appearing.  It is advisable to seek
another way to accomplish your goal.



--- Nir Geier <> wrote:

> hi all,
> Does anyone knows how can I stop process under
> windows?
> For example: 
> executing the following (Under Windows):
> <target name="name" description="desc">
> 	<exec executable="cmd.exe">
> 		<arg line="/c ping -t"/>
> 	</exec>
> </target>
> is there any way to write ant to stop the target?
> Nir Geier.
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 

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

View raw message