blob: 921dd3d6c3980d72c897a69c1a70a0c64469967f (
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
26
27
28
29
30
|
/*
* ngIRCd -- The Next Generation IRC Daemon
*/
#include "portab.h"
/**
* @file
* waitpid() implementation. Public domain.
* Written by Steven D. Blackford for the NeXT system.
*/
#ifndef HAVE_WAITPID
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
GLOBAL int
waitpid(pid, stat_loc, options)
int pid, *stat_loc, options;
{
for (;;) {
int wpid = wait(stat_loc);
if (wpid == pid || wpid == -1)
return wpid;
}
}
#endif
|