The difference between clone and fork

Source: Internet
Author: User

Fork () is all replication vfork () is a shared memory clone () is a parent process resource that can be selectively copied to a child process, and the data structure that is not replicated is shared by the child process through the replication of the pointer, specifically what resources are copied to the child process, as determined by the clone_flags in the parameter list. In addition, clone () returns the PID of the child process.
Clone is an upgraded version of fork that not only creates a process or thread, but also specifies the creation of a new namespace (namespace), a selective memory that inherits the parent process, or even a sibling process that can turn the created process into a parent process, and so on.

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.