title: WIFEXITED WIFEXITSTATUS macros
body: <p>I'm using the luajit ffi library to call into the C library function waitpid.</p>
  
  <p>However I can't find a proper specification for the encoding of the status result.  The only documentation I've found are C macro functions I'd prefer to write in pure lua.</p>
  
  <p>I had a brief look at the header files defining these macro's and would you know it, they are not simple but refer to other macros which refer to still other macros.  </p>
  
  <p>Can you help?</p>