Chubaka
Chubaka

Reputation: 3155

Linux cannot kill a PID: invalid signal

IN ubuntu Amazon EC2 instances with root access

when do

ps -e

The process shows up with a valid PID and process name. The database table also suggests the process is still ongoing.

  PID TTY          TIME CMD
32194 ?        00:00:00 test
32253 ?        00:00:00 mysql

However, any of the following commands kill the process, but returns nothing or "invalid signal".

top 
kill
Type in PID
y
returns "invalid signal"

or

kill -9 PID
kill -s PID
etc.

Could any guru enlighten how to deal with the "ghost jobs"?

Upvotes: 2

Views: 8546

Answers (2)

mahatmanich
mahatmanich

Reputation: 11033

Did you use the correct rights to kill the process? With root you should be able to kill the process using either:

$ su -
# kill -9 PID

or

$ sudo kill -9 PID

Upvotes: 4

FOP
FOP

Reputation: 1022

You have the id of the process, say 32194, I suggest you run:

pgrep -l a | grep 32194

If the process name has an 'a', the output will show the line and the process name. if not have an 'a', change the letter by other one.

When the process appear, just kill it with:

pkill <process name>

Upvotes: 0

Related Questions