What does the option -9 mean for killall?

68

Solution 1

(I assume you're talking about the Linux killall command.)

The option -9 is listed in a generic way under -SIGNAL. The description specified that

Signals can be specified either by name (e.g. -HUP or -SIGHUP) or by number (e.g. -1) or by option -s.

So you can use killall -9 or killall -s 9 to send signal number 9, killall -42 or killall -s 42 to send signal number 42, etc. You can use killall -KILL or killall -s KILL to send the KILL signal, etc.

On traditional and modern Unix systems and on most POSIX systems, signal number 9 is the kill signal. On many systems you can use kill -l 9 to list the signal name corresponding to number 9; in bash, kill -l lists the recognized signal names with their corresponding numbers.

Solution 2

This sends the SIGKILL (9) signal to all processes. A process can not intercept this signal, and is immediately killed. This means no process can clean up after itself, and even system critical processes will get killed with no contemplation.

Its single process kill -9 pid equivalent is very strongly discouraged for exactly the reason given above, killall is much more dangerous.

Always remember that Unix/Linux does exactly as told, even if the command is destructive. You, the system administrator, are in complete control. With awesome power comes great responsibility.

Solution 3

It sends SIGKILL to an process (or multiple with killall).

SIGKILL - The SIGKILL signal forces the process to stop executing immediately. The program cannot ignore this signal. This process does not get to clean-up either.

http://www.linux.org/threads/kill-commands-and-signals.4423/

Share:
68

Related videos on Youtube

madhu kotagiri
Author by

madhu kotagiri

Updated on September 18, 2022

Comments

  • madhu kotagiri
    madhu kotagiri almost 2 years

    Response :

    {
      "errorMessage":"DISABLED_APP",
     "noretryTTL":10,
     "status":"error",
     "errorCode":"400",
     "instrPixelURL":"http://aax-us-east.amazon-adsystem.com/x/px/p/clo1CLBaEaz365GXct2.IA/"
    }
    
    • Rui F Ribeiro
      Rui F Ribeiro over 8 years
      Be careful (ab)using the killall command as the potencial for doing damage is far greater.