home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Club Elmshorn Atari PD
/
CCE_PD.iso
/
pc
/
0400
/
CCE_0423.ZIP
/
CCE_0423.PD
/
INCLUD83.ZOO
/
wait.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-07-20
|
753b
|
44 lines
#ifndef _WAIT_H
#define _WAIT_H
#ifdef __cplusplus
extern "C" {
#endif
struct __wait {
#ifndef __MSHORT__
unsigned junk:16; /* padding to make it 32 bits */
#endif
unsigned retcode:8;
unsigned coredump:1;
unsigned termsig:7;
};
union wait {
struct __wait _w;
int _i;
};
#define w_termsig _w.termsig
#define w_stopsig _w.retcode
#define w_coredump _w.coredump
#define w_retcode _w.retcode
/* I don't know if this next one is right or not */
#define w_status _i
#define WSTOPPED 33 /* fake "signal" for stopped processes */
#define WIFSIGNALED(x) ((x)._w.termsig != 0)
#define WIFSTOPPED(x) ((x)._w.termsig == WSTOPPED)
#define WIFEXITED(x) ((x)._w.termsig == 0)
#define WNOHANG 1
#define WUNTRACED 2
#ifdef __cplusplus
}
#endif
#endif