Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ukma!david
From: david@ms.uky.edu (David Herron -- One of the vertebrae)
Newsgroups: comp.sys.amiga
Subject: Re: Unix on the Amiga
Message-ID: <9247@g.ms.uky.edu>
Date: 12 May 88 17:43:16 GMT
References: <8805092040.AA17873@cory.Berkeley.EDU>
Reply-To: david@ms.uky.edu (David Herron -- One of the vertebrae)
Organization: U of Kentucky, Mathematical Sciences
Lines: 37

In article <8805092040.AA17873@cory.Berkeley.EDU> dillon@CORY.BERKELEY.EDU (Matt Dillon) writes:
>	Yah, I use vfork() all the time.  It's a hack.  My opinion stands,
>but perhaps I should reword it:
>
>	"Having used UNIX systems extensively, I have never liked the way
>child processes are spun off with fork()/vfork().  The method is
>cute conceptually, but not very powerful... more like wastefull 
>(even vfork())."
>
>	Note that my main point is that the calls are not very powerful.

Agreed that they aren't very powerful.

However, the fact that they aren't very powerful -- er.. MORE that they
do simple & useful things -- allows GREAT flexibility in what can be
done on the system.

THe fact/opinion that 99% of all fork()'s are immediately followed
by the child doing an exec() SHOULD cause a new system call that does
the combination of fork()/exec() directly.  vfork() is the stupid hack.

There are things which you can do in an environment where fork()/exec() 
are split that you can't do (er.. are harder to do) when fork()/exec()
are not seperated.  

An example is the classic terminal program on Unix.  You have one
process that does a fork(), the parent handles terminal to modem
traffic and the child handles modem to terminal traffic.  There is no
busy waiting because read() calls hang until i/o is available.  It's
very simple to write, I've got one that's about 1-2 screens long which
I came up with about 10 minutes thought when I needed a really simple
one to do something.
-- 
<---- David Herron -- The E-Mail guy            
<---- or:                {rutgers,uunet,cbosgd}!ukma!david, david@UKMA.BITNET                                  
<---- Windowing... The Amiga has windowing. The Mac has windowing (echoes of
<---- Jonathan Livingston Seagull: "Just flying? A mosquito can do that much!").