10.1 MasteringLinuxCommandLine-12-Process
10.1 MasteringLinuxCommandLine-12-Process
The Process
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
The Process
What is a PROCESS? “time” command
Parent & Child Processes Signals
Program Vs Process “stty” command
Types of Processes “kill” command
Foreground Processes
Background Processes $ and $$ System Variables
Daemons
“wait” command
Internal and External Commands Job Control (jobs, fg and bg)
“ps” command
How is a process created?
“nohup” command
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
Process
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
www.GlobaleTraining.com 1
Mastering Linux Command Line 11/19/2019
Process
A program in execution is called a process.
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
A Parent Process
B Child Process
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
www.GlobaleTraining.com 2
Mastering Linux Command Line 11/19/2019
Types of Processes
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
Types of Processes
Interactive Process (or Foreground Process)
Non-Interactive Process (or Background Process)
Daemons
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
www.GlobaleTraining.com 3
Mastering Linux Command Line 11/19/2019
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
10
$! and $$
Variable Purpose
$! PID of the last background process
$$ PID of the current shell
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
11
Signals
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
12
www.GlobaleTraining.com 4
Mastering Linux Command Line 11/19/2019
Signals
A signal is a message sent to a process.
A parent process and child process could send signals to each other.
Signals have:
Name
Number
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
13
Signals
SIGNAL Name Meaning
1 SIGUP Hang up
2 SIGINT Interrupt
3 SIGQUIT Quit
9 SIGKILL Sure Kill
15 SIGTERM Software Termination
24 SIGSTOP Stopped
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
14
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
15
www.GlobaleTraining.com 5
Mastering Linux Command Line 11/19/2019
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
16
__ DONE __
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com
17
www.GlobaleTraining.com 6