blob: f067d07552cdf60b2f5235f66d3a6f1f02038c08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/* 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;
}
|