Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!purdue!decwrl!gilroy.pa.dec.com!klee From: klee@gilroy.pa.dec.com (Ken Lee) Newsgroups: comp.unix.questions Subject: Re: Using vfork() -vs fork() Message-ID: <1694@bacchus.dec.com> Date: 17 Aug 89 22:23:06 GMT References: <1989Jun19.013230.16107@marob.masa.com> Sender: news@decwrl.dec.com Lines: 18 In article <1989Jun19.013230.16107@marob.masa.com>, daveh@marob.masa.com (Dave Hammond) writes: > Can someone provide concrete examples of where I'd want to use vfork(), > rather than fork()? vfork is intended specifically for the case where the child process will exec soon after the vfork. The parent process is suspended in the interim. A quick exec is common (most of the time), so this performance hack is useful. In their book, Leffler, et al, say: "Although allowing modification of the parent's address space is bad programming practice, some programs have been known to take advantage of this quirk." You can play games with the parent during a vfork, but this is rarely worthwhile. Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@decwrl.dec.com uucp: uunet!decwrl!klee