What’s different between Ctrl+Z and Ctrl+C in Unix command line?

Control+Z is used for suspending a process by sending it the signal SIGSTOP, which cannot be intercepted by the program.

Control+C is used to kill a process with the signal SIGINT, and can be intercepted by a program so it can clean its self up before exiting, or not exit at all.

If we suspend a process, this will show up in the shell to tell us, that it has been suspended:

[1]+  Stopped                 yes

And when we kill a running process we get a shell prompt without any confirmation message.

 

Please follow and like us:
0

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.