1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-05-09 10:44:08 +00:00
ngircd/src/portab/waitpid.c

34 lines
488 B
C

/*
* 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 "imp.h"
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include "exp.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