title: c program fork and wait golang process status
body: <p>C program:</p>
  
  <pre><code>pid = fork();
  
  if (pid == 0) {
      execv("Golang Process");
  } else (pid &gt; 0) {
      wait(&amp;status);
      printf("process %d status: %d\n", pid);
  }
  </code></pre>
  
  <p>Golang Program:</p>
  
  <pre><code>func main() {
      ......
      os.Exit(1)
  }
  </code></pre>
  
  <p>But, output is:
  process XXX status: 256</p>
  
  <p>if set os.Exit(2), output is:
  process XXX status: 512</p>
  
  <p>if set os.Exit(3), output is:
  process XXX status: 768</p>
  
  <p>Why?</p>