Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ames!lll-winken!uunet!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.unix.questions Subject: Re: spawning a child by double forking Message-ID: <4871@ficc.uu.net> Date: 3 Jul 89 21:45:13 GMT References: <12376@bloom-beacon.MIT.EDU> Organization: Xenix Support, FICC Lines: 14 In article <12376@bloom-beacon.MIT.EDU>, jik@athena.mit.edu (Jonathan I. Kamens) writes: > Second, let's say that my program has a 512k binary image. I fork > the first time, and I'm taking up a meg of memory. I fork again, and > I'm taking up a meg and a half. Not if you have a modern fork() that does copy-on-write. And even if you have a stupid fork you probably have vfork(). The cost of forking children is really pretty minor these days. (yow, an innovation that actually REDUCES memory use! Must be a mistake!) -- Peter da Silva, Xenix Support, Ferranti International Controls Corporation. Business: peter@ficc.uu.net, +1 713 274 5180. | "X3J11 is not in the business Personal: peter@sugar.hackercorp.com. | of legislating morality ..." Quote: Have you hugged your wolf today? `-_-' | -- Henry Spencer