title: why print 'hello' three times in my centos?
body: <pre><code>#include "csapp.h"
  
  int main()
  {
          int i;
  
          for (i = 0; i &lt; 2; i++)
                  fork();
          printf("hello\n");
          exit(0);
  }
  </code></pre>
  
  <pre><code>/*
   *                .------------------------
   *                |
   *                |
   *                |
   *    .-----------.------------------------
   *    |
   *    |
   *    |           .------------------------
   *    |           |
   *    |           |
   *    |           |
   *    .-----------.------------------------
   *   fork        fork
   *   i=0         i=1
   */
  </code></pre>
  
  <p>In the process pic, it seems the code will print "hello" four times.
  Why print 'hello' three times in my centos?</p>