Path: utzoo!attcan!uunet!lll-winken!tekbspa!oblio!mats From: mats@oblio.UUCP (Mats Wichmann) Newsgroups: comp.unix.questions Subject: Re: Using vfork() -vs fork() Message-ID: <422@oblio.UUCP> Date: 29 Jun 89 18:10:21 GMT References: <1989Jun19.013230.16107@marob.masa.com> Organization: Counterpoint Computers, Inc. San Jose CA 95131 Lines: 17 daveh@marob.masa.com (Dave Hammond) writes: >Can someone provide concrete examples of where I'd want to use vfork(), >rather than fork()? When you know you are going to do an exec() right away. Which the Berkeley people argue (correctly) is a very frequent use for fork(). The issue is that copying the process space of the parent to make the child seems like a lot of work if you are going to throw it away by exec'ing another program right away. So vfork() shares the addresses spaces instead of making a copy. Making the child copy-on-write is another way to accomplish this (transparently), as in Sys V.3, but there you still pay the costs to set up the table structures. Another way is to get real virtual memory (Mach claims to do this stuff better, for example). Mats Wichmann Acer America