]> arthur.barton.de Git - ngircd-alex.git/blob - src/portab/waitpid.c
0c169601df3fedebca97461cd04c6a2c0ba9ffdd
[ngircd-alex.git] / src / portab / waitpid.c
1 /*
2  * ngIRCd -- The Next Generation IRC Daemon
3  *
4  * waitpid() implementation. Public domain.
5  * Written by Steven D. Blackford for the NeXT system.
6  *
7  */
8
9 #include "portab.h"
10
11 #include "imp.h"
12 #include <string.h>
13 #include <stdlib.h>
14 #include <sys/types.h>
15
16 #include "exp.h"
17
18 #ifndef HAVE_WAITPID
19
20 GLOBAL int
21 waitpid(pid, stat_loc, options)
22 int pid, *stat_loc, options;
23 {
24         for (;;) {
25                 int wpid = wait(stat_loc);
26                 if (wpid == pid || wpid == -1)
27                         return wpid;
28         }
29 }
30
31 #endif