我知道 linux 进程的 pid。 我想使用 ANT 脚本终止该进程。
我应该使用什么 ANT 目标/命令?
在windows中我是这样做的
什么是 linux 等价物?
最佳答案
得到答案
<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>
关于linux - 如何使用Pid通过Ant命令杀死linux进程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20328356/