How to kill a process in cygwin?

Diemauerdk picture Diemauerdk · Jun 4, 2012 · Viewed 44.2k times · Source

Hi i have the following process which i cant kill:

The process to be killed.

I am running cygwin in windows xp 32 bit.

I have tried issuing the following commands:

/bin/kill -f 4760
/bin/kill -9 5000
kill -9 5000
kill 5000

When i write /bin/kill -f 4760 i get the message, 'kill: couldn't open pid 4760'.

When i write /bin/kill -9 5000 i get the message, 'kill: 5000: No such process'.

I simply don't understand why this process cant be killed. Since it has a WINID shouldnt it be killed by /bin/kill -f 4760?

hope someone can help thx :)

Answer

kjp picture kjp · Jun 4, 2012

The process is locked from Windows most likely. The error you are getting "couldnt open PID XXX" points to this. To confirm try killing it with windows taskkill

    taskkill /PID 4760