Who is responsible for a retry (was Re: Is System V.4 fork reliable?)

Lady Lodge Systems lls at kings.co.uk
Thu Aug 2 22:47:18 AEST 1990


In article <1809 at necisa.ho.necisa.oz> boyd at necisa.ho.necisa.oz (Boyd Roberts) writes:
>When fork() fails with EAGAIN it fails for a good reason.
>A trivial addition to user-mode programs is what is required, and NOT 
>the re-definition of a well defined critical interface.
>Leave the kernel and C library alone.  Write your own re-trying fork().

OK! Napalm dispenser armed.....

How about AT&T making the 'trivial' addition to their user mode programs?
The shell springs to mind! What are you suggesting? I make the trivial
addition of rewriting the shell?? How about the other programs that
I only have in binary form - rewrite them as well??

People are missing the whole point here.  The vast majority of Un*x
users are binary only licencees and cannot easily change their code to
deal with EAGAIN returns in all of their (binary only) programs.  When
fork fails through a temporary log-jam in the kernel surely the kernel
should deal with the situation before telling the calling application
that the world has just ended?  If fork fails because the process table
is full we can fix that by retuning for sensible limits - WE CAN'T FIX
THE KERNEL GETTING ITS INTERNALS SNARLED UP

The code that I write does check for EAGAIN and retry - however, other
utilities and packages that I call (including /bin/sh) do not - how do 
I fix that?
-- 
 -------------------------------------------------------------------------
| Peter King.                          | Voice: +44 733 239445            |
| King Bros (Lady Lodge) Ltd           | EMAIL: root at kings.co.uk          |
| Lady Lodge House, Orton Longueville, | UUCP: ...mcvax!ukc!kings!root    |
| Peterborough, PE2 0HZ, England.      |                                  |
 -------------------------------------------------------------------------



More information about the Comp.unix.wizards mailing list