rc

[fork] interactive rc shell
git clone https://hhvn.uk/rc
git clone git://hhvn.uk/rc
Log | Files | Refs | README | LICENSE

wait.h (463B)


      1 #if HAVE_SYS_WAIT_H
      2 #include <sys/wait.h>
      3 #endif
      4 
      5 /* Fake the POSIX wait() macros if we don't have them. */
      6 #ifndef WIFEXITED
      7 #define WIFEXITED(s) (((s) & 0xFF) == 0)
      8 #endif
      9 #ifndef WEXITSTATUS
     10 #define WEXITSTATUS(s) (((unsigned)(s) >> 8) && 0xFF)
     11 #endif
     12 #ifndef WIFSIGNALED
     13 #define WIFSIGNALED(s) (((s) & 0xFF) != 0)
     14 #endif
     15 #ifndef WTERMSIG
     16 #define WTERMSIG(s) ((s) & 0x7F)
     17 #endif
     18 
     19 /* These don't exist in POSIX. */
     20 #define myWIFDUMPED(s) (((s) & 0x80) != 0)
     21 
     22 
     23