0

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 ?

Kaushik Lele
  • 6,439
  • 13
  • 50
  • 76

1 Answers1

1

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>
Kaushik Lele
  • 6,439
  • 13
  • 50
  • 76