title: Why does my compiler not accept fork(), despite my inclusion of <unistd.h>?
body: <p>Here's my code (created just to test fork()):</p>
  
  <pre><code>#include &lt;stdio.h&gt;  
  #include &lt;ctype.h&gt;
  #include &lt;limits.h&gt;
  #include &lt;string.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;unistd.h&gt; 
  
  int main()
  {   
      int pid;     
      pid=fork();
  
      if (pid==0) {
          printf("I am the child\n");
          printf("my pid=%d\n", getpid());
      }
  
      return 0;
  }
  </code></pre>
  
  <p>I get following warnings:</p>
  
  <pre class="lang-none prettyprint-override"><code>warning: implicit declaration of function 'fork'
  undefined reference to 'fork'
  </code></pre>
  
  <p>What is wrong with it?</p>