470 views
0 votes
0 votes
We know vfork() shares parents memory..

Does vfork() shares parents resources also??.

What about the clone()??

1 Answer

0 votes
0 votes

@Subbu

The intent of vfork was to eliminate the overhead of copying the whole process image if you only want to do an exec* in the child….

Because exec* replaces the whole image of the child process, there is no point in copying the image of the parent. For other kinds of uses, vfork is dangerous and unpredictable...

Vfork() is also system call which is used to create new process...

New process created by vfork() system call is called child process and process that invoked vfork() system call is called parent process...

Code of child process is same as code of its parent process.

Child process suspends execution of parent process until child process completes its execution as both processes share the same address space....

 

1. https://pubs.opengroup.org/onlinepubs/009696799/functions/vfork.html  

 

No related questions found