File: wait.h

package info (click to toggle)
rc 1.7.2-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,084 kB
  • ctags: 1,050
  • sloc: ansic: 7,631; sh: 1,123; yacc: 124; makefile: 100; perl: 13
file content (23 lines) | stat: -rw-r--r-- 463 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif

/* Fake the POSIX wait() macros if we don't have them. */
#ifndef WIFEXITED
#define WIFEXITED(s) (((s) & 0xFF) == 0)
#endif
#ifndef WEXITSTATUS
#define WEXITSTATUS(s) (((unsigned)(s) >> 8) && 0xFF)
#endif
#ifndef WIFSIGNALED
#define WIFSIGNALED(s) (((s) & 0xFF) != 0)
#endif
#ifndef WTERMSIG
#define WTERMSIG(s) ((s) & 0x7F)
#endif

/* These don't exist in POSIX. */
#define myWIFDUMPED(s) (((s) & 0x80) != 0)