title: Catch SIGINT in Xcode 12.5.1
body: <p>In Xcode, I want to do something when ctrl + c is pressed, but it looks like lldb doesn't catch SIGINT signal. I tried the most simple C++ program, just for a test:</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;signal.h&gt;
    
  void sigintHandler(int sig_num)
  {
      signal(SIGINT, sigintHandler);
      printf(&quot;I'm doing something \n&quot;);
      fflush(stdout);
  }
    
  int main ()
  {
      signal(SIGINT, sigintHandler);
    
      while(1)
      {        
      }
      return 0;
  }
  </code></pre>
  <p>but it won't work. I also tried the solution:</p>
  <pre><code>process handle SIGINT -s false
  process handle SIGINT -p true
  </code></pre>
  <p>Still, it does nothing. What am I doing wrong?</p>