Subversion Repositories tendra.SVN

Rev

Rev 74 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
74 7u83 1
#define	_W_INT(i)	(i)
2
 
3
#define	_WSTATUS(x)	(_W_INT(x) & 0177)
4
#define	_WSTOPPED	0177		/* _WSTATUS if process is stopped */
5
#define	WIFSTOPPED(x)	(_WSTATUS(x) == _WSTOPPED)
6
#define	WSTOPSIG(x)	(_W_INT(x) >> 8)
7
#define	WIFSIGNALED(x)	(_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0 && (x) != 0x13)
8
#define	WTERMSIG(x)	(_WSTATUS(x))
9
#define	WIFEXITED(x)	(_WSTATUS(x) == 0)
10
#define	WEXITSTATUS(x)	(_W_INT(x) >> 8)
11
#define	WIFCONTINUED(x)	(x == 0x13)	/* 0x13 == SIGCONT */
12
#if __BSD_VISIBLE
13
#define	WCOREDUMP(x)	(_W_INT(x) & WCOREFLAG)
14
 
15
#define	W_EXITCODE(ret, sig)	((ret) << 8 | (sig))
16
#define	W_STOPCODE(sig)		((sig) << 8 | _WSTOPPED)
17
#endif
18
 
19
/*
20
 * Option bits for the third argument of wait4.  WNOHANG causes the
21
 * wait to not hang if there are no stopped or terminated processes, rather
22
 * returning an error indication in this case (pid==0).  WUNTRACED
23
 * indicates that the caller should receive status about untraced children
24
 * which stop due to signals.  If children are stopped and a wait without
25
 * this option is done, it is as though they were still running... nothing
26
 * about them is returned. WNOWAIT only request information about zombie,
27
 * leaving the proc around, available for later waits.
28
 */
29
#define	WNOHANG		1	/* Don't hang in wait. */
30
#define	WUNTRACED	2	/* Tell about stopped, untraced children. */
31
#define	WSTOPPED	WUNTRACED   /* SUS compatibility */
32
#define	WCONTINUED	4	/* Report a job control continued process. */
33
#define	WNOWAIT		8	/* Poll only. Don't delete the proc entry. */
34
#define	WEXITED		16	/* Wait for exited processes. */
35
#define	WTRAPPED	32	/* Wait for a process to hit a trap or
36
				   a breakpoint. */
37
 
38