KILL(1) COMMAND REFERENCE KILL(1) NAME kill - terminate a process with extreme prejudice SYNOPSIS kill [ -sig ] processid ... kill -l DESCRIPTION Kill sends the TERM (terminate, 15) signal to the specified processes. If a signal name or number preceded by `-' is given as first argument, that signal is sent instead of terminate (see signal(3c)). The signal names are listed by `kill -l', and are as given in /usr/include/signal.h, stripped of the common SIG prefix. The terminate signal will kill processes that do not catch the signal; `kill -9 ...' is a sure kill, as the KILL (9) signal cannot be caught. By convention, if process number 0 is specified, all members in the process group (i.e. processes resulting from the current login) are signaled. The killed processes must belong to the current user unless he is the super-user. To shut the system down and bring it up single user the super-user may send the initialization process a TERM (terminate) signal by `kill 1'; see init(8). To force init to close and open terminals according to what is currently in /etc/ttys use `kill -HUP 1' (sending a hangup (which is signal number 1) to process number 1). The process number of an asynchronous process started with `&' is reported by the shell. OPTIONS -l Lists the signal names. -sig The specified signal is sent to the specified process. EXAMPLES The following example absolutely terminates process number 186. kill -9 186 This example shows a shell script that can be used to log off of the system by sending the hangup signal to the process group. #!/bin/sh echo "Logging off..." kill -HUP 0 Printed 4/6/89 1
KILL(1) COMMAND REFERENCE KILL(1) RETURN VALUE [NO_ERRS] Command completed without error. [USAGE] Incorrect command line syntax. Execution terminated. [NP_ERR] An error occurred that was not a system error. Execution terminated. [P_WARN] A system error occurred. Execution continues. See intro(2) for more information on system errors. SEE ALSO ps(1), sh(1sh), kill(2), and signal(3c). Printed 4/6/89 2
%%index%% na:240,101; sy:341,252; de:593,1457; op:2050,215; ex:2265,405; rv:2982,553; se:3535,204; %%index%%000000000122