【发布时间】:2013-12-02 12:27:14
【问题描述】:
我知道 linux 进程的 pid。 我想使用 ANT 脚本终止该进程。
我应该使用什么 ANT 目标/命令?
在windows中我是这样做的
什么是 linux 等价物?
【问题讨论】:
标签: linux ant process kill pid
我知道 linux 进程的 pid。 我想使用 ANT 脚本终止该进程。
我应该使用什么 ANT 目标/命令?
在windows中我是这样做的
什么是 linux 等价物?
【问题讨论】:
标签: linux ant process kill pid
找到答案
<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>
【讨论】: