summaryrefslogtreecommitdiff
path: root/include/wait.h
blob: 7de9276b8d9d81d9c88b67c708e7a41ca157d26d (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