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 :)
Use -f to terminate native Windows processes not started by Cygwin processes. -f can also be useful to terminate Cygwin processes not answering to SIGKILL. Unless you specific the -W option, the "pid" values used by kill are the Cygwin pids, not the Windows pids.
kill [-f] [-signal] [-s signal] pid ... The kill program allows you to send arbitrary signals to other Cygwin programs.
Unless you specific the -W option, the "pid" values used by kill are the Cygwin pids, not the Windows pids. To get a list of running programs and their Cygwin pids, use the Cygwin ps program. ps -W will display all windows pids. The kill -l option prints the name of the given signal, or a list of all signal names if no signal is given.
The WINPID is also the PID, and they can be killed with the Cygwin kill command's -f option.
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
Strangely, the following works in Cygwin:
echo PID1 PID2 PID3 | xargs kill -f
For example:
ps -W | grep WindowsPooPoo | awk '{print $1}' | while read line; do echo $line | xargs kill -f; done;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With