101-400 Exam QuestionsBrowse all questions from this exam

101-400 Exam - Question 38


Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting?

Show Answer
Correct Answer: D

kill -TERM 123 sends a termination signal to the specified process, allowing it to catch the signal and perform any necessary cleanup operations before exiting. Unlike the -KILL signal, which forces the process to terminate immediately without cleanup, the -TERM signal is a more graceful way to stop a process.

Discussion

1 comment
Sign in to comment
DuboisNicolasDuclairOption: D
Oct 21, 2023

The command that kills the process with the PID 123 but allows the process to "clean up" before exiting is: D. `kill -TERM 123` Using `kill -TERM` (or simply `kill 123`) sends a termination signal to the process, allowing it to perform cleanup operations and terminate gracefully. This is the standard way to request a process to stop and is not as forceful as `kill -KILL`, which terminates the process abruptly without allowing it to clean up.