February 2001
Beginner to intermediate
448 pages
9h 2m
English
Official Description
Sends a signal to a running process.
Syntax
kill [-signal_name | signal_number] process_ID...
Options
-l lists all signals.
-n num sends the specified signal number.
-s name sends the specified signal name.
Oddities
The kill 0 command terminates all your background processes.
Example
$ buzz & # Create three background jobs [1] 913 $ buzz& [2] 914 $ buzz& [3] 915 $ $ jobs –l # Display the jobs [3] + 915 Running buzz& [2] - 914 Running buzz& [1] 913 Running buzz & $ $ kill -n 2 914 # Send signal # 2 to pid 914 $ [2] - buzz& $ $ jobs –l # Two jobs left [3] + 915 Running buzz& [1] - 913 Running buzz & $ $ kill 0 # Eliminate all background jobs [3] + Terminated buzz& [1] - Terminated buzz & $ $ jobs –l # Gone $
Read now
Unlock full access