While working in an interactive Bash session you start tcpdump in the foreground, which immediately floods the terminal with live packet data. A few seconds later you need the prompt back so you can run other commands, but you also want to resume the capture in the foreground later without losing any packets already buffered. You press Ctrl + z.
Which statement accurately describes the state of the tcpdump process immediately after you press that key sequence?
It keeps running normally in the background after relinquishing control of the terminal and will continue printing output until you use fg.
The shell sends SIGTERM to the process, it exits immediately, and the shell returns an exit status of 130.
Bash renices the process to the lowest priority (19) but leaves it running in the foreground, so the packet data still scrolls.
The process receives SIGTSTP, is put into the shell's job table in a stopped state (STAT "T"), and uses no CPU until resumed with bg or fg.
Ctrl + z causes the terminal driver to translate the keystroke into the SIGTSTP signal and deliver it to the foreground process group. Unless the program blocks or handles the signal, the kernel stops the process, changes its state to T (stopped by job-control signal), and Bash records the job in its internal table, displaying a line like "+ Stopped tcpdump". While stopped, the process receives no CPU time and produces no output until it is continued with bg (which sends SIGCONT and lets it run in the background) or fg (which brings it back to the foreground).
The other options are incorrect: sending the job to the background while it continues to run happens only after a subsequent bg command, Bash does not automatically renice the job, and SIGTSTP does not terminate the process (SIGTERM or SIGINT would).
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does SIGTSTP mean and how does it differ from SIGCONT?
Open an interactive chat with Bash
How does Bash's job control table work?
Open an interactive chat with Bash
What happens to process resources when a job is 'stopped'?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access