Logo 
Search:

Unix / Linux / Ubuntu FAQ

Submit Interview FAQ
Home » Interview FAQ » Unix / Linux / UbuntuRSS Feeds

Difference between the fork() and vfork() system call?

  Shared By: Adah Miller    Date: Jan 25    Category: Unix / Linux / Ubuntu    Views: 1670

Answer:

During the fork() system call the Kernel makes a copy of the parent process’s address space and attaches it to the child process.
But the vfork() system call do not makes any copy of the parent’s address space, so it is faster than the fork() system call. The child process as a result of the vfork() system call executes exec() system call. The child process from vfork() system call executes in the parent’s address space (this can overwrite the parent’s data and stack ) which suspends the parent process until the child process exits.

Share: 
 

Didn't find what you were looking for? Find more on Difference between the fork() and vfork() system call? Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: