Annotation of coherent/e/bin/ksh/wait.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * POSIX <sys/wait.h>
                      3:  */
                      4: 
                      5: #if __STDC__
                      6: #define        ARGS(args)      args
                      7: #else
                      8: #define        ARGS(args)      ()
                      9: #endif
                     10: 
                     11: #ifndef _I386
                     12: #if 1
                     13: typedef int pid_t;             /* belong in sys/types.h */
                     14: #endif
                     15: #endif
                     16: 
                     17: /* waitpid options */
                     18: #define WNOHANG                1       /* don't hang in wait */
                     19: #define WUNTRACED      2       /* tell about stopped, untraced children */
                     20: 
                     21: #define        WSTOPPED        0x7F    /* process is stopped */
                     22: 
                     23: #define WIFSTOPPED(x)  (((x)&0xFF) == 0x7F)
                     24: #define WIFSIGNALED(x) (((x)&0xFF) != 0x7F && ((x)&0x7F) != 0)
                     25: #define WIFEXITED(x)   (((x)&0xFF) != 0x7F && ((x)&0x7F) == 0)
                     26: #define        WIFCORED(x)     (!!((x)&0x80)) /* non-standard */
                     27: #define        WEXITSTATUS(x)  ((x)>>8&0xFF)
                     28: #define        WTERMSIG(x)     ((x)&0x7F)
                     29: #define        WSTOPSIG(x)     ((x)>>8&0xFF)
                     30: 
                     31: pid_t wait ARGS((int *statp));
                     32: #if _BSD
                     33: pid_t wait3 ARGS((int *statp, int options, Void *));
                     34: /* todo: does not emulate pid argument */
                     35: #define        waitpid(pid, sp, opts)  wait3(sp, opts, (Void*)NULL)
                     36: #else
                     37: pid_t waitpid ARGS((pid_t pid, int *statp, int options));
                     38: #endif
                     39: 

unix.superglobalmegacorp.com

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