Path: utzoo!attcan!uunet!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.wizards Subject: Re: Is System V.4 fork reliable? Message-ID: <13317@smoke.BRL.MIL> Date: 8 Jul 90 05:58:59 GMT References: <561@oglvee.UUCP> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 22 In article <561@oglvee.UUCP> jr@oglvee.UUCP (Jim Rosenberg) writes: >The number of utilities that both use fork and also understand that under >some circumstances it ought to be *retried* if it fails is pitifully small. This is unfortunately true, but then so is the number of utilities that understand that write() might successfully write fewer than the requested number of bytes. >(The shell simply reports the bogus message "No more processes". Actually, the UNIX System V shells that I've encountered do keep retrying the fork() operation for a while. In fact, somewhere around SVR2.0 the shell was changed to use an "exponential backoff" algorithm, i.e. the delay between successive retries was doubled each time until some limit was hit, at which time the shell would give up with "No more processes". This algorithm, combined with a too-small per-user process limit, was directly responsible for some UNIX System V vendors failing to pass the operational demonstration in the large DA MINIS acquistion; because all the "batch" scripts were executed under the same UID, several of them quickly backed off to the point that they did not start running very soon after the heavy load had subsided; basically the machine was idle and the shells were sleeping like Rip van Winkle.