0 votes 0 votes We know vfork() shares parents memory.. Does vfork() shares parents resources also??. What about the clone()?? Subbu. asked Jan 25, 2022 Subbu. 470 views answer comment Share Follow See 1 comment See all 1 1 comment reply Arjun commented Jan 25, 2022 reply Follow Share yes, it does. Open a file and do a fork call. The opened file is accessible in child also. 0 votes 0 votes Please log in or register to add a comment.
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 aaa 1 answered Jan 25, 2022 aaa 1 comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments Arjun commented Jan 25, 2022 reply Follow Share @aaa 1 What’s your name? 0 votes 0 votes Subbu. commented Jan 25, 2022 reply Follow Share @Arjun One question what can a child process inherits from parent?? In fork() 0 votes 0 votes Arjun commented Jan 25, 2022 reply Follow Share Thats a textbook question. You can find good explanation here: https://en.wikipedia.org/wiki/Child_process#Children_created_by_fork 0 votes 0 votes Please log in or register to add a comment.