title: alarm function in unix
body: <p>Below code does not have error but I am expecting that it should have got terminated by itself after '5 seconds (argument in alarm function)'. I think I have misunderstood alarm behaviour.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  #include&lt;unistd.h&gt;
  #include&lt;sys/signal.h&gt;
  #define endl printf("\n")
  int main(int argc, char *argv[])
  {
  int rc;
  printf("Waiting for IOs");
  getchar();
  rc=alarm(5);
  printf("value of rc is %d", rc);
  endl;
  }
  </code></pre>
  
  <p>As per definition , <em>The alarm function allows us to set a timer that will expire at a specified time in the future. When the timer
  expires, the SIGALRM signal is generated. If we ignore or don't catch this signal, its default action is to terminate
  the process</em></p>