The difference between CTRL + Z and CTRL + C in Linux

Source: Internet
Author: User

Frankly, I didn't notice the difference between CTRL Z and CTRL C, because when I pressed it, I found that the current running commands stopped, and they seemed to function the same.

But recently when writing the socket program found that the server short use of CTRL C to end all normal, the next boot is normal. When using Ctrl Z to finish, it is found that the address is already occupied when it starts again, meaning that the port cannot start the new service.

At this point my first reaction is: is not the CTRL Z end what resources are not recycled?

Check the next to know that the Ctrl z does not really quit, but just put the command executed in the foreground in the background , this is what I use the socket client to send content or normal, this time can use jobs to view the background running program, the display is running.

At this time with FG to the background running Cheng put to the front desk, echo what is normal.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.