Occasionally, when I'm developing on my Mac, I'll get a process that hangs. When that happens, I'll try the following:
- Ctrl + C in the active terminal window
- If nothing happens, I'll open a new terminal window and do
kill -SIGTERM {PID}
- If still nothing, close the terminal window.
I'm running into situations where after doing both 1 and 2, the PID is still listed in my list of processes. In other words, there doesn't seem to be a command-line option to kill the process - all I can do is kill terminal.
In Linux command-line environments, we obviously don't have option 3. So do command-line interrupts operate differently there? Is there another way to kill processes I'm overlooking? What is the 'last resort' option for killing a Linux process?