I am a newbie in System Programming and I encounter some misunderstanding in fork and vfork.
- From my knowledge, fork duplicate parent process's process and child process has its own VM and own file descriptor table.
- As for vfork, it shared parent process's VM but child process will has its own file descriptor table.
So here comes the problem:
- As child process share parent process' address, why does it need its own file descriptor table?
- Where will the variable be stored if I declare one in the child process? (Will it use the space of parent process) Thanks a lot.