wait.h revision 8e3c57a3c9aa75d7adfa6ee670c67507535df4d4
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
*
* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
* All Rights Reserved
*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley Software License Agreement
* specifies the terms and conditions for redistribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* This file holds definitions relevent to the wait system call.
* Some of the options here are available only through the ``wait3''
* entry point; the old entry point with one argument has more fixed
* semantics, never returning status of unstopped children, hanging until
* a process terminates if any are outstanding, and never returns
* detailed information about process resource utilization (<vtimes.h>).
*/
#ifndef _sys_wait_h
#define _sys_wait_h
/*
* Structure of the information in the first word returned by both
* wait and wait3. If w_stopval==WSTOPPED, then the second structure
* describes the information returned, else the first. See WUNTRACED below.
*/
union wait {
int w_status; /* used in syscall */
/*
* Terminated process status.
*/
struct {
#if defined(_LITTLE_ENDIAN)
#elif defined(_BIG_ENDIAN)
#else
#endif
} w_T;
/*
* Stopped process status. Returned
* only for traced children unless requested
* with the WUNTRACED option bit.
*/
struct {
#if defined(_LITTLE_ENDIAN)
#elif defined(_BIG_ENDIAN)
#else
#endif
} w_S;
};
/*
* Option bits for the second argument of wait3. WNOHANG causes the
* wait to not hang if there are no stopped or terminated processes, rather
* returning an error indication in this case (pid==0). WUNTRACED
* indicates that the caller should receive status about untraced children
* which stop due to signals. If children are stopped and a wait without
* this option is done, it is as though they were still running... nothing
* about them is returned.
*/
extern pid_t csh_wait_noreap(void);
#endif /* _sys_wait_h */