1
0
Fork 0
qmail/wait_pid.c
D. J. Bernstein af9625ddf9 qmail 1.01
2009-12-18 13:07:04 +01:00

13 lines
283 B
C

#include <sys/types.h>
#include <sys/wait.h>
#include "error.h"
/* restriction: you must not care about any other child. */
int wait_pid(wstat,pid) int *wstat; int pid;
{
int r;
do
r = wait(wstat);
while ((r != pid) && ((r != -1) || (errno == error_intr)));
return r;
}