Hi i have the following process which i cant kill:
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 :)
Different Windows programs will handle the signals that
kill
sends differently; they've never been designed to deal with them in the same way that Linux/Cygwin programs are.The only reliable method for killing a Windows program is to use a Windows specific tool, such as Task Manager or Process Explorer.
That said, if you've not already, you may have luck with running your Cygwin terminal in administrator mode (right click on your shortcut and select "Run as administrator").
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
killall.sh - Kill by process name.
Usage:
Create a file called killall.sh with this line
Then give it execute permissions.
In your .bash_profile add this line
Then you just have to type "killall [name]"
The method presented by @Donal Tobin is correct:
kill -f <pid>
However, I don't need to log in as administrator.
Strangely, the following works in Cygwin:
For example: