My vague and intuitive understanding is that Ctrl+C kills the process that is currently running on the selected window.

I am getting confused though typically about the difference of what process get killed when an executable is called and when an interpreter is used.


When I use an interpreter. For example if I open R on the terminal, I can see one process which CMD (on call of ps) is R. When I use Ctrl+C however, the R process does not get killed but the process running in R gets killed.


When I call an exectuable, I can see one process which CMD (on call of ps) is <nameOfExecutable>. When I do Ctrl+C, this process is killed.


There seems to have some kind of hierarchy of processes (and there might be a correct semantic to refer to it). What does Ctrl+C exactly do in the light of this apparent hierarchy of processes?

For your information, I use Terminal 2.6.1 on Mac OS X 10.11.3


I am not sure but ctrl + c should send SIGINT signal to running process. Usually programs don't have custom handler for this signal and default action is taken (program is killed). I am guessing that interpreter intercepts this signal and simply stop executing running script.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.