From the man page of
vfork() differs from fork() in that the parent is suspended until the child makes a call to execve(2) or _exit(2). The child shares all memory with its parent, including the stack, until execve() is issued by the child. The child must not return from the current function or call exit(), but may call _exit().
Why should the child use an
_exit() rather than simply calling
exit()? I hope this is applicable to both