Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!mit-eddie!genrad!decvax!decwrl!pyramid!oliveb!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.unix.questions,comp.lang.c Subject: Re: Fork and Join, Pipe in C Message-ID: <21685@sun.uucp> Date: Sun, 21-Jun-87 17:57:13 EDT Article-I.D.: sun.21685 Posted: Sun Jun 21 17:57:13 1987 Date-Received: Tue, 23-Jun-87 00:52:29 EDT References: <7737@brl-adm.ARPA>, <1186@ius2.cs.cmu.edu> <8174@utzoo.UUCP> Sender: news@sun.uucp Followup-To: comp.unix.questions Lines: 28 Xref: mnetor comp.unix.questions:2903 comp.lang.c:2588 (Again, we redirect this to comp.unix.questions/INFO-UNIX.) > If vfork is much faster (as opposed to slightly faster) than fork, it is > time to complain to the supplier of your Unix, asking why he hasn't > implemented fork efficiently. Even Berkeley *intended* to fix this, as > witness the comments on the vfork manual page. Sensible vendors have > long since implemented copy-on-write fork, which eliminates most of the > copying involved in fork, thus eliminating most of the reason to use the > ugly and brain-damaged vfork. Or, at least, sensible vendors that are implementing on hardware that provides the ability to specify, with a relatively small granularity, regions of a process' address space such that attempts to modify them will cause traps. If, for example, you are stuck with write-protecting the entire data or stack segment, copy-on-write may not buy you much. Fortunately, most machines don't impose obnoxious restrictions of that flavor. The only remaining reason to use vfork is that one has written ugly and brain-damaged code that depends on the semantics of "vfork". Such code does, unfortunately, exist; one of the pre-releases of 4.3BSD used this crock in "find", but it was fixed before 4.3BSD went out the door in its final form. If anybody has written code of this sort, they should hang their head in shame and then go out and fix it NOW. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com