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

Boyd Roberts boyd at necisa.ho.necisa.oz
Tue Jul 31 09:56:00 AEST 1990


When fork() fails with EAGAIN it fails for a good reason.

How many lines of user-mode code does it take to code up retries?

About 20.

It would seem that there is some consensus to change the semantics of
fork() to retry.  This would break a critical interface.  System calls
do one thing, and one thing well.  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().

    NAME

	bork() - spawn new process with exponential backoff on failure

    SYNOPSIS

	int bork(retries)
	int retries; 

    ...


Boyd Roberts			boyd at necisa.ho.necisa.oz.au

``When the going gets wierd, the weird turn pro...''



More information about the Comp.unix.wizards mailing list