Reader small image

You're reading from  Linux Command Line and Shell Scripting Bible - Third Edition

Product typeBook
Published inJan 2015
PublisherWiley
ISBN-139781118983843
Edition3rd Edition
Tools
Right arrow
Authors (2):
Richard Blum
Richard Blum
author image
Richard Blum

Richard Blum has more than 25 years as a network and systems administrator, currently managing Microsoft, Unix, Linux, and Novell servers for a network with more than 3,500 users. He has developed online programming and Linux courses that he teaches to students worldwide.
Read more about Richard Blum

Christine Bresnahan
Christine Bresnahan
author image
Christine Bresnahan

Christine Bresnahan has worked in the IT industry for more than 30 years and is currently an adjunct professor of Python programming and Linux system administration classes at Ivy Tech Community College in Indianapolis. She is the co-author of Linux Bible, Eighth Edition, and Linux Command Line and Shell Scripting Bible.
Read more about Christine Bresnahan

View More author details
Right arrow

Handling Signals

Linux uses signals to communicate with processes running on the system. Chapter 4 described the different Linux signals and how the Linux system uses these signals to stop, start, and kill processes. You can control the operation of your shell script by programming the script to perform certain commands when it receives specific signals.

Signaling the bash shell

There are more than 30 Linux signals that can be generated by the system and applications. Table 16.1 lists the most common Linux system signals that you'll run across in your shell script writing.

Table 16.1 Linux Signals

Signal Value Description
1 SIGHUP Hangs up the process
2 SIGINT Interrupts the process
3 SIGQUIT Stops the process
9 SIGKILL Unconditionally terminates the process
15 SIGTERM Terminates the process if possible
17 SIGSTOP Unconditionally stops, but doesn't terminate, the process
18 SIGTSTP Stops or pauses the process, but doesn't terminate...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Linux Command Line and Shell Scripting Bible - Third Edition
Published in: Jan 2015Publisher: WileyISBN-13: 9781118983843

Authors (2)

author image
Richard Blum

Richard Blum has more than 25 years as a network and systems administrator, currently managing Microsoft, Unix, Linux, and Novell servers for a network with more than 3,500 users. He has developed online programming and Linux courses that he teaches to students worldwide.
Read more about Richard Blum

author image
Christine Bresnahan

Christine Bresnahan has worked in the IT industry for more than 30 years and is currently an adjunct professor of Python programming and Linux system administration classes at Ivy Tech Community College in Indianapolis. She is the co-author of Linux Bible, Eighth Edition, and Linux Command Line and Shell Scripting Bible.
Read more about Christine Bresnahan