XK0-004 · Question #332
A systems administrator is editing a service file for the web server. In order to continue testing, all web server processes must be shut down. The administrator accomplishes this with the following…
The correct answer is D. The -15 signal gracefully kills the process and all Its parent and child processes. SIGTERM (-15) is the graceful termination signal that allows a process to clean up and shut down its entire process group, including child workers.
Question
A systems administrator is editing a service file for the web server. In order to continue testing, all web server processes must be shut down. The administrator accomplishes this with the following commands:
Based on the command output above, which of the following BEST explains how this was accomplished?
Exhibit
Options
- AKilling the parent process with -15 gives it a chance to kill all of the child processes.
- BThe -15 signal will allow the kill command to automatically seek out all child processes and kill
- CThe -15 signal tells the command to kill all processes matching the Apache string.
- DThe -15 signal gracefully kills the process and all Its parent and child processes.
How the community answered
(61 responses)- A15% (9)
- B5% (3)
- C8% (5)
- D72% (44)
Why each option
SIGTERM (-15) is the graceful termination signal that allows a process to clean up and shut down its entire process group, including child workers.
The phrasing is misleading - SIGTERM does not give the kill command a special ability; rather, the parent process itself decides to terminate its children as part of its own graceful shutdown handler.
The kill command with -15 sends SIGTERM only to the explicitly specified PID and does not automatically seek or enumerate child processes - that responsibility belongs to the parent process's signal handler.
Signal -15 is the SIGTERM signal number and is unrelated to name-based pattern matching; tools like killall or pkill are required to target processes by name.
Sending signal -15 (SIGTERM) to a parent server process like Apache instructs it to terminate gracefully - the parent process handles its own cleanup and signals all child worker processes to exit as well, resulting in a complete, orderly shutdown of every process in that service tree.
Concept tested: SIGTERM graceful process and child termination
Source: https://man7.org/linux/man-pages/man7/signal.7.html
Topics
Community Discussion
No community discussion yet for this question.
