Xref: utzoo comp.unix.questions:14591 comp.sys.att:6843 Path: utzoo!attcan!uunet!cs.utexas.edu!rutgers!rochester!pt.cs.cmu.edu!cadre!pitt!darth!dehart From: dehart@darth.PGH.PA.US (Ed DeHart) Newsgroups: comp.unix.questions,comp.sys.att Subject: Re: vfork is miniframe libraries? Summary: vfork = fork Message-ID: <7@darth.PGH.PA.US> Date: 29 Jun 89 13:36:16 GMT References: <22990@santra.UUCP> Followup-To: poster Organization: Darth Software, Pittsburgh Pa. Lines: 36 In article <22990@santra.UUCP>, hsu@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@darth.pgh.pa.us -OR- darth!dehart@vax.cs.pittsburgh.edu