CS350 COS
COS
Loading...
Searching...
No Matches
wait.h File Reference
#include <sys/cdefs.h>
Include dependency graph for wait.h:

Go to the source code of this file.

Macros

#define WEXITSTATUS(_x)   (_x & 0x000000ff)
 
#define _WSTATUS(_x)   ((_x & 0x0000ff00) >> 8)
 
#define WIFEXITED(_x)   (_WSTATUS(_x) == 0)
 
#define WGETPID(_x)   ((pid_t)(_x >> 16))
 
#define WAIT_ANY   0
 

Functions

pid_t wait (int *status)
 
pid_t waitpid (pid_t pid, int *status, int options)
 

Macro Definition Documentation

◆ _WSTATUS

#define _WSTATUS (   _x)    ((_x & 0x0000ff00) >> 8)

Definition at line 9 of file wait.h.

◆ WAIT_ANY

#define WAIT_ANY   0

Definition at line 16 of file wait.h.

◆ WEXITSTATUS

#define WEXITSTATUS (   _x)    (_x & 0x000000ff)

Definition at line 8 of file wait.h.

◆ WGETPID

#define WGETPID (   _x)    ((pid_t)(_x >> 16))

Definition at line 13 of file wait.h.

◆ WIFEXITED

#define WIFEXITED (   _x)    (_WSTATUS(_x) == 0)

Definition at line 11 of file wait.h.

Function Documentation

◆ wait()

pid_t wait ( int *  status)

Definition at line 49 of file process.c.

50{
51 return waitpid(WAIT_ANY, status, 0);
52}
pid_t waitpid(pid_t pid, int *status, UNUSED int options)
Definition: process.c:34
#define WAIT_ANY
Definition: wait.h:16
Here is the call graph for this function:
Here is the caller graph for this function:

◆ waitpid()

pid_t waitpid ( pid_t  pid,
int *  status,
int  options 
)