freebsd-dev/gnu/libexec/uucp/libunix/isfork.c
1995-05-30 05:05:38 +00:00

26 lines
316 B
C

/* isfork.c
Retry fork several times before giving up. */
#include "uucp.h"
#include "sysdep.h"
#include <errno.h>
pid_t
ixsfork ()
{
int i;
pid_t iret;
for (i = 0; i < 10; i++)
{
iret = fork ();
if (iret >= 0 || errno != EAGAIN)
return iret;
sleep (5);
}
return iret;
}