nerdexam
CompTIA

XK0-005 · Question #1327

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. The -15 (SIGTERM) signal sends a request to a process to terminate gracefully, allowing it to clean up resources and, if it is a parent process, signal its child processes to terminate as well. This ensures a clean shutdown of the web server and its associated components.

System Management

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

XK0-005 question #1327 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

(24 responses)
  • A
    8% (2)
  • B
    4% (1)
  • D
    88% (21)

Why each option

The -15 (SIGTERM) signal sends a request to a process to terminate gracefully, allowing it to clean up resources and, if it is a parent process, signal its child processes to terminate as well. This ensures a clean shutdown of the web server and its associated components.

AKilling the parent process with -15 gives it a chance to kill all of the child processes.

While killing the parent process with -15 does give it a chance to kill child processes, option D provides a more complete explanation of the graceful termination and scope.

BThe -15 signal will allow the kill command to automatically seek out all child processes and kill

The -15 signal instructs the target process to terminate gracefully, but it does not make the `kill` command itself automatically seek out and kill child processes; the parent process is responsible for handling its children upon receiving SIGTERM.

CThe -15 signal tells the command to kill all processes matching the Apache string.

The -15 signal is a termination signal directed at specific process IDs, not a command to kill processes based on string matching, which would typically be handled by utilities like `pkill` or `killall`.

DThe -15 signal gracefully kills the process and all Its parent and child processes.Correct

The `kill -15` command sends a SIGTERM signal to the specified process. This signal requests the process to terminate gracefully, allowing it to release resources, save data, and properly shut down, which includes signaling its child processes to terminate before exiting itself.

Concept tested: Linux process management and signals (SIGTERM)

Source: https://man7.org/linux/man-pages/man7/signal.7.html

Topics

#Process Management#Signals#System Shutdown#Service Management

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice