Annotation of mstools/posix/h/sys/wait.h, revision 1.1.1.1

1.1       root        1: /*++
                      2: 
                      3: Copyright (c) 1989  Microsoft Corporation
                      4: 
                      5: Module Name:
                      6: 
                      7:    wait.h
                      8: 
                      9: Abstract:
                     10: 
                     11:    This module contains the symbolic constants, macros, and structures needed to
                     12:    support wait, waitpid, and _exit in in IEEE P1003.1/Draft 13.
                     13: 
                     14: Author:
                     15: 
                     16:    Mark Lucovsky     21-Feb-1989
                     17: 
                     18: Revision History:
                     19: 
                     20: --*/
                     21: 
                     22: #ifndef _SYS_WAIT_
                     23: #define _SYS_WAIT_
                     24: 
                     25: /*
                     26:  * wait options
                     27:  */
                     28: 
                     29: #define WNOHANG   0x00000001
                     30: #define WUNTRACED 0x00000002
                     31: 
                     32: /*
                     33:  * Structure of wait status value
                     34:  *
                     35:  *    Bit 32 - 0 if process terminated normally
                     36:  *             1 if process was signaled
                     37:  *    Bit 31 - 0 if process is not stopped
                     38:  *             1 if process is stopped
                     39:  *    Bits 0-7 exit status or signal number
                     40:  */
                     41: 
                     42: /*
                     43:  * Evaluate to non-zero if process terminated normally (by calling _exit)
                     44:  */
                     45: 
                     46: #define WIFEXITED(stat_val) (\
                     47:    ((int)(stat_val) >= 0 ? 1 : 0 ))
                     48: 
                     49: /*
                     50:  * Returns the low-order 8 bits of the status argument passed to _exit
                     51:  */
                     52: 
                     53: #define WEXITSTATUS(stat_val) (\
                     54:    ((int)(stat_val) & 0x000000ff ))
                     55: 
                     56: /*
                     57:  * Evaluate to non-zero if process terminated due to receipt of a signal
                     58:  * that was not caught
                     59:  */
                     60: 
                     61: #define WIFSIGNALED(stat_val) (\
                     62:    ((int)(stat_val) < 0 ? 1 : 0 ))
                     63: 
                     64: /*
                     65:  * Returns the signal number of the signal that caused the process to terminate
                     66:  */
                     67: 
                     68: #define WTERMSIG(stat_val) (\
                     69:    ((int)(stat_val) & 0x000000ff ))
                     70: 
                     71: /*
                     72:  * Evaluate to non-zero if process is currently stopped
                     73:  */
                     74: 
                     75: #define WIFSTOPPED(stat_val) (\
                     76:    ((int)(((int)stat_val<<1)) < 0 ? 1 : 0 ))
                     77: 
                     78: /*
                     79:  * Returns the signal number of the signal that caused the process to stop
                     80:  */
                     81: 
                     82: #define WSTOPSIG(stat_val) (\
                     83:    ((int)(stat_val) & 0x000000ff ))
                     84: 
                     85: pid_t _CRTAPI1 wait(int *);
                     86: pid_t _CRTAPI1 waitpid(pid_t, int *, int);
                     87: 
                     88: #endif /* _SYS_WAIT_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.