freebsd-dev/gnu/libexec/uucp/libunix/isfork.c
1995-08-19 21:30:30 +00:00

26 lines
317 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;
}