1

In windows we can use

<target name="stopnode" description="Stops all instances of node">
    <exec executable="taskkill">
        <arg value="/IM"/>
        <arg value="node.exe"/>
    </exec>
</target>

in Mac when I use kill -9 process_id

or killall node

based on the SO post Stop node.js program from command line.

It says process not found when I am trying to use the following code to kill the node server

<exec osfamily="unix" executable="killall" failonerror="false" resultproperty="prp.result.kill">
    <arg line="node"/>
</exec>
3
  • This question appears to be off-topic because it is not about programming. Perhaps Super User or Server Fault would be a better place to ask. Commented Jun 13, 2014 at 8:04
  • Yeah it might I however have seen similar questions on stackoverflow so thought of posting here. Anyways I will post there too ..Thanks Commented Jun 13, 2014 at 8:17
  • No big deal @Nav. I thought it was a good question, so I up'd it anyway. You genuinely might have better luck on the other sites. It never hurts to ask. Commented Jun 13, 2014 at 8:19

1 Answer 1

0

I am now using pkill command for this

pkill node

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.