title: How to overwrite(reset) the default behaviour of SIGUSR1?
body: <p>I read about add signal() function in the signal handler function can over write the default behaviour:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;signal.h&gt;
  #include &lt;unistd.h&gt;
  void signalHandler();
  int main(void) {
      signal(SIGUSR1, signalHandler);
      sleep(60);
      printf("I wake up");
      return 0;
  }
  void signalHandler() {
      signal(SIGUSR1, signalHandler);// I add this line to overwrite the default behaviour 
      printf("I received the signal");
  }
  </code></pre>
  
  <p>And I trigger it with another process </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;signal.h&gt;
  #include &lt;stdlib.h&gt;
  int main(int argc, char *argv[]) {
  
      kill(5061, SIGUSR1); // 5061 is the receiver pid, kill(argv[1], SIGUSR1) doesn't working, when I get 5061 as parameter
      puts("send the signal ");
      return 0;
  }
  </code></pre>
  
  <p>The receiver process <code>wake up</code> as soon as it receiver the <code>SIGUSR1</code> signal. How can I make the  receiver continue <code>sleep</code> even when it receive the signal from other process?</p>
  
  <p>BTW why  <code>kill(5061, SIGUSR1);</code> 5061 is the receiver pid, <code>kill(argv[1], SIGUSR1)</code> doesn't work, when I get 5061 as parameter?</p>