vfork is miniframe libraries?
Ed DeHart
dehart at darth.PGH.PA.US
Thu Jun 29 23:36:16 AEST 1989
In article <22990 at santra.UUCP>, hsu at kampi.hut.fi (Heikki Suonsivu) writes:
> Convergent Miniframe libc has vfork. Does anyone know if it is real or
> just a wrapper for fork? No dis..
>
I had thought that vfork was real since the CT folks used the BSD 4.2 virtual
memory model for CTIX. Before posting something I decided to test vfork
just to make sure that it really was vfork.
My tests showed that my guess was incorrect and that vfork is just fork with
a different name.
Since the child process uses the parent's address space the first ground rule
is to not mess with anything, just exec out like a good child. My test program
had the child change the value of something then have the parent print the
result.
--------------------
#define CHILD_PROC 0
main()
{
int proc, foo=0;
if ((proc = vfork()) == CHILD_PROC) {
foo = 1;
execl ("/bin/date",0);
}
else
printf ("proc -> %d, foo -> %d\n", proc, foo);
}
I would have expected foo to be 1 if vfork was real but foo was 0. No vfork.
Thanks, Ed DeHart / wa3yoa
Usenet: {pitt | bellcore}!darth!dehart -OR- uunet!apexepa!darth!dehart
Internet: dehart at darth.pgh.pa.us -OR- darth!dehart at vax.cs.pittsburgh.edu
More information about the Comp.unix.questions
mailing list