summaryrefslogtreecommitdiffstats
path: root/wait_nohang.c
diff options
context:
space:
mode:
Diffstat (limited to 'wait_nohang.c')
-rw-r--r--wait_nohang.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/wait_nohang.c b/wait_nohang.c
new file mode 100644
index 0000000..bea2774
--- /dev/null
+++ b/wait_nohang.c
@@ -0,0 +1,12 @@
1#include <sys/types.h>
2#include <sys/wait.h>
3#include "haswaitp.h"
4
5int wait_nohang(wstat) int *wstat;
6{
7#ifdef HASWAITPID
8 return waitpid(-1,wstat,WNOHANG);
9#else
10 return wait3(wstat,WNOHANG,(struct rusage *) 0);
11#endif
12}