Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why number 9 in kill -9 command in unix? [closed]

I understand it's off topic, I couldn't find anywhere online and I was thinking maybe programming gurus in the community might know this.
I usually use

kill -9 pid

to kill the job. I always wondered the origin of 9. I looked it up online, and it says

"9 Means KILL signal that is not catchable or ignorable. In other words it would signal process (some running application) to quit immediately" (source: http://wiki.answers.com/Q/What_does_kill_-9_do_in_unix_in_its_entirety)

But, why 9? and what about the other numbers? is there any historical significance or because of the architecture of Unix?

like image 898
Alby Avatar asked Mar 30 '12 23:03

Alby


2 Answers

See the wikipedia article on Unix signals for the list of other signals. SIGKILL just happened to get the number 9.

You can as well use the mnemonics, as the numbers:

kill -SIGKILL pid
like image 156
Rafał Rawicki Avatar answered Nov 14 '22 02:11

Rafał Rawicki


There were 8 other signals they came up with first.

like image 77
Jonathon Reinhart Avatar answered Nov 14 '22 03:11

Jonathon Reinhart