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