Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting?
Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting?
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.
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.