Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!wuarchive!mit-eddie!uw-beaver!zephyr.ens.tek.com!tekcrl!tekgvs!sail!terryl From: terryl@sail.LABS.TEK.COM Newsgroups: comp.unix.wizards Subject: Re: Who is responsible for a retry (was Re: Is System V.4 fork reliable?) Message-ID: <7909@tekgvs.LABS.TEK.COM> Date: 1 Aug 90 18:33:02 GMT References: <561@oglvee.UUCP> <480@amanue.UUCP> <13426@cbmvax.commodore.com> <573@oglvee.UUCP> <7885@tekgvs.LABS.TEK.COM> <866@mwtech.UUCP> Sender: news@tekgvs.LABS.TEK.COM Reply-To: terryl@sail.LABS.TEK.COM Organization: Tektronix, Inc., Beaverton, OR. Lines: 29 In article <866@mwtech.UUCP> martin@mwtech.UUCP (Martin Weitzel) writes: >In article <7885@tekgvs.LABS.TEK.COM> terryl@sail.LABS.TEK.COM writes: >[many wise words about KISS principle and the spirit of unix deleted] > >But IMHO it's not quite appropriate here. I think the questions here is: > > Who should retry if a fork fails? Well, I'll agree to disagree!!! (-: IMHO, the KISS principle and the spirit of unix IS appropriate here, and you deleted one of my main reasons why with respect to your question "Who should retry if a fork fails?" And the reason is one of policy; as I said in my previous post, the kernel SHOULD NOT be making policy decisions that are better left to the application program. Having the kernel ALWAYS sleeping and retrying if a fork() fails is a policy decision that may not always be appropriate. However, many people have brought up a point that I didn't think about at first; the error code EAGAIN is overloaded to mean two totally different things: one, a transient condition of not enough system resources(i.e. disk swap space, real memory, etc.) to satisfy the request, and two, a more perma- nent condition of running into some system-wide limits (i.e. no more process slots, too many processes for this user id, etc.), and I'll be happy to agree (-: on this point that the two error conditions should be signaled differently. Terry Laskodi of Tektronix