Advanced Linux & Shell Scripting
Q94 / 100

What is the difference between "SIGTERM" and "SIGKILL", and why might a process fail to terminate even when sent SIGKILL?

Correct! Well done.

Incorrect.

The correct answer is A) SIGTERM is a "polite" request a process can catch to clean up before exiting, while SIGKILL cannot be caught — yet a process can seem "stuck" after SIGKILL if in an uninterruptible kernel state, since the signal applies only on return to user space

A

Correct Answer

SIGTERM is a "polite" request a process can catch to clean up before exiting, while SIGKILL cannot be caught — yet a process can seem "stuck" after SIGKILL if in an uninterruptible kernel state, since the signal applies only on return to user space

Explanation

Processes stuck in uninterruptible sleep (state "D" in "ps", often due to NFS or hardware I/O issues) cannot immediately respond to any signal, including SIGKILL, because the kernel won't deliver signals until the blocking kernel-space operation completes or times out.

Progress
94/100