Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!uw-beaver!zephyr.ens.tek.com!ogicse!uwm.edu!cs.utexas.edu!devnull!lance From: lance@mpd.tandem.com (Lance Hartmann) Newsgroups: comp.unix.aix Subject: Re: vfork() (was Re: RS6000 questions/comments) Summary: vfork() usage Keywords: compiler problems rs6000, vfork() Message-ID: <351@devnull.mpd.tandem.com> Date: 28 Jun 91 19:42:41 GMT References: <141@ssi.UUCP> <1991Jun27.221208.14845@kithrup.COM> <8903@awdprime.UUCP> Sender: news@devnull.mpd.tandem.com Distribution: usa Organization: Tandem Computers (MPD) Austin, TX Lines: 21 In article <8903@awdprime.UUCP> ransom@perelandra.austin.ibm.com (Jeff Peek) writes: >In article <1991Jun27.221208.14845@kithrup.COM> sef@kithrup.COM (Sean Eric Fagan) writes: >>In article <141@ssi.UUCP> cjr@ssi.UUCP (Cris J. Rhea) writes: >>>* The rs6k like the u370 (that's the 3090) has no vfork(). >> >>vfork() is a hack, although, I will admit, it does have its uses. The only >>legitimate use of vfork() is that the child will execute before the parent. >>[REMAINDER DELETED] "...only legitimate use...child will execute before parent"??? The MAIN reason to use vfork() is when it is desired to spawn a child that does nothing but an execve(). With this scenario, it is unnecessary to copy the address space of the parent, so using vfork() is much more efficient. Also, don't forget to use _exit() (note the leading underscore '_') INSTEAD of exit() in the event the execve() fails so that you don't hose the parent's stdio. -- Lance G. Hartmann - cs.utexas.edu!devnull!lance (Internet) ------------------------------------------------------------------------------- DISCLAIMER: All opinions/actions expressed herein reflect those of my VERY OWN and shall NOT bear any reflection upon Tandem or anyone else for that matter.