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