Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ kill(1) — SunOS 5.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csh(1)

jobs(1)

ksh(1)

ps(1)

sh(1)

shell_builtins(1)

kill(2)

signal(3C)

signal(5)

kill(1)

NAME

kill − terminate a process by default

SYNOPSIS

kill [ −signal ] pid...
kill −signal −pgid...
kill −l

AVAILABILITY

SUNWcsu

DESCRIPTION

kill sends a signal to the specified processes.  The value of signal may be numeric or symbolic. (See signal(5)).  The symbolic signal name is the name as it appears in /usr/include/sys/signal.h, with the SIG prefix stripped off.  Signal 15 (SIGTERM) is sent by default; this will normally kill processes that do not catch or ignore the signal. 

pid and pgid are unsigned numeric strings that identify which process(es) should receive the signal.  If pid is used, the process with process ID pid is selected.  If pgid is used, all processes with process group ID pgid are selected. 

The process number of each asynchronous process started with & is reported by the shell (unless more than one process is started in a pipeline, in which case the number of the last process in the pipeline is reported).  Process numbers can also be found by using ps(1). 

The details of the kill are described in kill(2).  For example, if process number 0 is specified, all processes in the process group are signaled. 

The signalled process must belong to the current user unless the user is the super-user. 

OPTIONS

−l kill will print a list of symbolic signal names. 

The 3 shells, sh(1), csh(1), and ksh(1) each have built-in versions of the kill command for processes identified with a jobid number. 

SEE ALSO

csh(1), jobs(1), ksh(1), ps(1), sh(1), shell_builtins(1), kill(2), signal(3C), signal(5)

NOTES

sh

The Bourne shell, sh, has a built-in version of kill to provide the functionality of the kill command for processes identified with a jobid.  The sh  syntax is:

kill [ −signal ] %jobid

csh

The C-shell, csh, also has a built-in kill command, whose syntax is:

kill [ −sig ] [ pid ] [ %job ] ...

kill −l

The csh kill built-in sends the TERM (terminate) signal, by default, or the signal specified, to the specified process ID, the job indicated, or the current job. Signals are either given by number or by name. There is no default. Typing kill does not send a signal to the current job.  If the signal being sent is TERM (terminate) or HUP (hangup), then the job or process is sent a CONT (continue) signal as well. 

−l List the signal names that can be sent. 

ksh

The ksh kill’s syntax is:

kill [ −sig ] %job ...

kill −l

The ksh kill sends either the TERM (terminate) signal or the specified signal to the specified jobs or processes.  Signals are either given by number or by names (as given in signal(5) stripped of the prefix “SIG” with the exception that SIGCHD is named CHLD).  If the signal being sent is TERM (terminate) or HUP (hangup), then the job or process will be sent a CONT (continue) signal if it is stopped.  The argument job can be the process id of a process that is not a member of one of the active jobs.  In the second form, kill −l, the signal numbers and names are listed. 

SunOS 5.4  —  Last change: 14 Sep 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026