Running state to a Stopped state. The shell intercepts the state change and updates its internal job table, returning control of the terminal (TTY) to the Bash prompt.
Signal Implementation
Job suspension is driven by two specific POSIX signals:SIGTSTP(Terminal Stop): Typically generated by the terminal driver when the user inputs the suspend character. Processes can catch, handle, or ignore this signal.SIGSTOP(Stop): A forceful suspension signal sent programmatically. The kernel handles this directly; the target process cannot catch, block, or ignore it.
SIGCONT (Continue) signal directed at the process.
Syntax and Commands
Suspending a Foreground Job The default terminal suspend keystroke sends aSIGTSTP to the foreground process group.
SIGSTOP or SIGTSTP using the kill command.
jobs builtin reads the shell’s internal job table to display the status of all jobs associated with the current session.
+ denotes the current default job, - denotes the previous default job).
Resuming Suspended Jobs
Bash provides builtins that automatically send the SIGCONT signal to resume execution. The fg command sets the terminal’s foreground process group to match the job’s existing process group (granting it TTY control via tcsetpgrp), while bg simply sends SIGCONT to the process group without altering terminal control.
Tired of Poor Bash Skills? Fix That With Deep Grasping!Learn More





