Date: Mon, 17 Jun 1996 20:33:15 -0700 (PDT) From: Sujal Patel <smpatel@umiacs.umd.edu> To: Michael Hancock <michaelh@cet.co.jp> Cc: hackers@freebsd.org Subject: Re: vfork cow? Message-ID: <Pine.NEB.3.92.960617202626.179L-100000@xi.dorm.umd.edu> In-Reply-To: <Pine.SV4.3.93.960618105553.6804A-100000@parkplace.cet.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 Jun 1996, Michael Hancock wrote: > I didn't realize that vfork in 4.4bsd was implemented with copy-on-write > semantics until I read the deamon book. Is it really going to be a > deprecated call kept around for compatibility? Through I hate vfork() with a passion because it's so messy and badly implemented, there are a "few" reasons why it should be left around: 1- Many old programs use vfork()'s "feature" of allowing the child access to the parent's address space. While it's plain wrong for a program to exploit this side-effect of vfork(), it's already done (and hard to undo). 2- vfork() is still slightly faster then fork() because the parent is suspended until the child calls exec(). This gives us the benefit of less page faults (because the parent isn't running, and therefore can't change anything in it's address space, and therefore won't cause a fault [because the pages are set copy-on-write]). Sujal
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.92.960617202626.179L-100000>