title: The return code of an application is an int16_t?
body: <p>When talking about starting a new process, you can do it using <code>int system(char* command)</code>. If you pass an <strong>non NULL</strong> parameter, you can get:</p>
  <ul>
  <li><code>-1</code> if the child process cannot be started;</li>
  <li>a return code of the child process otherwise;</li>
  </ul>
  <blockquote>
  <p>note: in Unix/Linux the return code is located <strong>on the higher eight bits of the result, while the lower eight bits contain the termination reason code</strong>&gt;{1}&lt;, so a retcode equal to 1 will be returned as 256; you can get the actual return code by shifting the value eight bits to the right; there is also a macro named WEXITSTATUS() that does it for you.</p>
  </blockquote>
  <p>Searching for <a href="https://unix.superglobalmegacorp.com/Net2/newsrc/sys/wait.h.html" rel="nofollow noreferrer">the implementation</a> of <code>WEXITSTATUS()</code> it's a shift 8 bits to the right.</p>
  <p><code>#define WEXITSTATUS(x) (_W_INT(x) &gt;&gt; 8)</code></p>
  <p>This is the reason why I tend to think that return codes are 2 bytes (and also from &gt;{1}&lt;). The quote is from a C course found online.</p>
  <p>P.s I would like to know the difference between the return code and termination reason code, aren't they the same?</p>