Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: comp.lang.c Subject: Re: Fork and Join, Pipe in C Message-ID: <8174@utzoo.UUCP> Date: Sat, 20-Jun-87 23:58:54 EDT Article-I.D.: utzoo.8174 Posted: Sat Jun 20 23:58:54 1987 Date-Received: Sat, 20-Jun-87 23:58:54 EDT References: <7737@brl-adm.ARPA>, <1186@ius2.cs.cmu.edu> Organization: U of Toronto Zoology Lines: 15 > If the child processes that you are forking don't use > much of the code that the parent usings, I sugguest you use > vfork and execl to spawn processes. vfork is much faster than > fork since it doesn't copy the parents address space... 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. -- "There is only one spacefaring Henry Spencer @ U of Toronto Zoology nation on Earth today, comrade." {allegra,ihnp4,decvax,pyramid}!utzoo!henry