Controlling shell processes using signals

Slashdot it! Delicious Share on Facebook Tweet! Digg!
Kirsty Pargeter, 123RF

Kirsty Pargeter, 123RF

Clear Signals

Instead of just killing processes, professionals cleverly catch their communication and steer the computer's tasks in the right direction using signals.

In most cases, kill is used as a last resort. It ends a process without mercy. Systems administrators sometimes kill a process with the kill -9 <PID> command – using the signal 9, which means kill even if the signal is not catchable or ignorable) and the process ID (PID) argument. You can get the PID by using the ps command.

Signals

The standard Linux signals are listed in Table 1. Related systems, such as FreeBSD, have their own variations, with the signals 1, 3, 9, and 15 being the only uniform ones throughout.

You can determine which of the two methods your system uses with kill -l . You can use the kill command in the format kill -<number> <PID> or kill -s <signal_name> <PID> . When using the signal name, you don't need the preceding SIG , so you can either do:

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content