Send the normal termination signal to PID 4242 and allow cleanup.
Which command is appropriate?
When no signal is specified, kill sends SIGTERM. It asks the process to exit cleanly; SIGKILL should be a last resort.
Detailed explanation
kill 4242Correct. kill 4242 sends the default SIGTERM.
Correct. kill 4242 sends the default SIGTERM.
kill -KILL 4242Incorrect. SIGKILL cannot be caught or cleaned up and is not the normal first choice.
Incorrect. SIGKILL cannot be caught or cleaned up and is not the normal first choice.
kill -STOP 4242Incorrect. SIGSTOP suspends the process.
Incorrect. SIGSTOP suspends the process.
kill -CONT 4242Incorrect. SIGCONT resumes a stopped process.
Incorrect. SIGCONT resumes a stopped process.
Try it yourself
An example you can run in a temporary verification environment.
kill -l TERMExpected result
SIGTERMのsignal番号または名称Key points
- kill
- SIGTERM
- Graceful termination
Notes
- Environment: Bash/coreutils互換killのsignal表示
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.