Do a vfork parent and child share file descriptors?
Roland McGrath
mcgrath at paris.Berkeley.EDU
Sat Jun 10 17:05:37 AEST 1989
If I create a child with `vfork', memory is shared between the parent and
child. What else is shared? Are file descriptors shared?
What happens if I do:
if (vfork () == 0)
{
/* Child side. */
close (fd_created_above);
execve (...);
}
/* Parent side. */
...
What happens to `fd_created_above' in the parent.
I'm using a Sun 3 running Sun Unix 3.5, but I assume this is the same for all
4.2 BSD derivatives.
Please MAIL YOUR RESPONSE to roland at ai.mit.edu, and ONLY RESPOND IF YOU KNOW
WHAT YOU'RE TALKING ABOUT.
--
Roland McGrath
Free Software Foundation, Inc.
roland at ai.mit.edu, uunet!ai.mit.edu!roland
More information about the Comp.unix.wizards
mailing list