title: CURL cannot be killed by a PHP SIGINT with custom signal handler
body: <p>I have a PHP command line app with a custom shutdown handler:</p>
  
  <pre><code>&lt;?php
  declare(ticks=1);
  
  $shutdownHandler = function () {
      echo 'Exiting';
      exit();
  };
  
  pcntl_signal(SIGINT, $shutdownHandler); 
  
  while (true) {
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, 'http://blackhole.webpagetest.org');
      curl_exec($ch);
      curl_close($ch);
  }
  </code></pre>
  
  <p>If I kill the script with <kbd>Ctrl</kbd>+<kbd>C</kbd> while a CURL request is in progress, it has no effect. The command just hangs. If I remove my custom shutdown handler, <kbd>Ctrl</kbd>+<kbd>C</kbd> kills the CURL request immediately.</p>
  
  <p>Why is CURL unkillable when I define a <code>SIGINT</code> handler?</p>