title: signal handler with sighup
body: <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;sys/signal.h&gt;
  #include &lt;string.h&gt;
  
  void handler (int sig);
  int count;
  
  int main() {
  
      struct sigaction act;
      memset (&amp;act, 0, sizeof (act));
  
  
      act.sa_handler = handler;
      if (sigaction (SIGHUP, &amp;act, NULL) &lt; 0) {
          perror ("sigaction");
          exit (-1);
      }
  
      int count = 0;
      while(1) {
          sleep(1);
          count++;
      }
  
  }
  
  void handler (int signal_number){
          printf ("count is %d\n", count);
  }
  </code></pre>
  
  <p>I assume i am doing this right, how would I go about call sighup within the command line? It needs to call sighup to print out my count.</p>