summary refs log tree commit diff
path: root/runit-2.1.2/src/wait_nohang.c
blob: 5c9c53dbdab57293c33615c30c673c036ad5bcd6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Public domain. */

#include <sys/types.h>
#include <sys/wait.h>
#include "haswaitp.h"

int wait_nohang(wstat) int *wstat;
{
#ifdef HASWAITPID
  return waitpid(-1,wstat,WNOHANG);
#else
  return wait3(wstat,WNOHANG,(struct rusage *) 0);
#endif
}