title: I used wait(&status) and the value of status is 256, why?
body: <p>I have this line in my code : </p>
  
  <pre><code>t = wait(&amp;status); 
  </code></pre>
  
  <p>When the child process works, the value of status is 0, well.</p>
  
  <p>But why does it return 256 when it doesn't work? And why changing the value of the argument given to exit in the child process when there is an error doesn't change anything (exit(2) instead of exit(1) for example)?</p>
  
  <p>Thank you</p>
  
  <p>Edit : I'm on linux, and I compiled with GCC.</p>
  
  <p>I defined status like this </p>
  
  <pre><code>int status;
  t = wait(&amp;status); 
  </code></pre>