summaryrefslogtreecommitdiff
path: root/include/wait.h
blob: 846b838b2bd75a83055276cb64929bbe9bb38251 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef WAIT_H
#define WAIT_H

/**
  * @file wait.h
  * @author djb
  * @ref s/qmail
  */

int wait_pid(int *,int);
int wait_nohang(int *);
int wait_stop();
int wait_stopnohang();

#define wait_crashed(w) ((w) & 127)
#define wait_exitcode(w) ((w) >> 8)
#define wait_stopsig(w) ((w) >> 8)
#define wait_stopped(w) (((w) & 127) == 127)

#endif