title: How to stop a process from being closed after certain signal is sent?
body: <p>I need to create a program, which will create child process that will handle processes. In case of SIGXCPU called, child process should close, but when other signal is received, process shouldn't close, but display information. How could I change signals_handler function to stop closing my process?</p>
  
  <p>I call signals from second terminal window. </p>
  
  <pre><code>void signals_handler(int signal) {
     psignal(signal,"\nRecived signal");
     printf("Signal number is: %d\n", signal);
     return;
  }
  
  void sig_XCPU(int signal() {
     signal(XCPU, sig_XCPU);
  }
  </code></pre>
  
  <p>...</p>
  
  <pre><code>int main(void)
  {
  
     if(fork() == 0) {
     print("PID: %d", getpid();
     signal(SIGXCPU, sig_xcpu)
     for(int = 1; i &lt; 65; i++) {
         if(i != 24) //SIGXCPU number
         signal(i, signals_handler);
     }
     sleep(100);
     return 0;
     }
  }
  
  return 0;
  }
  </code></pre>