Reputation: 6637
I know pid of a linux process. I want to kill that process using ANT script.
What ANT target/command should I use ?
In windows I do it this way
What is linux equivalent of this ?
Upvotes: 0
Views: 1230
Reputation: 6637
Got the answer
<target name="-killProcess">
<property name="server1.process.pid" value="30916" />
<echo message="server1.process.pid ${server1.process.pid}"/>
<property name="killCommandArg" value=" -9 ${server1.process.pid}" />
<echo message="killCommandArg ${killCommandArg}"/>
<exec executable="kill" failonerror="true">
<arg line="${killCommandArg}" />
</exec>
</target>
Upvotes: 1