title: Why can't I catch SIGINT when asyncio event loop is running?
body: <p>Using Python 3.4.1 on Windows, I've found that while executing an <a href="https://docs.python.org/3/library/asyncio.html" rel="noreferrer">asyncio event loop</a>, my program can't be interrupted (i.e. by pressing Ctrl+C in the terminal). More to the point, the SIGINT signal is ignored. Conversely, I've determined that SIGINT is handled when not in an event loop.</p>
  
  <p>Why is it that SIGINT is ignored when executing an asyncio event loop?</p>
  
  <p>The below program should demonstrate the problem - run it in the terminal and try to stop it by pressing Ctrl+C, it should keep running:</p>
  
  <pre><code>import asyncio
  import signal
  
  
  # Never gets called after entering event loop
  def handler(*args):
      print('Signaled')
  
  
  signal.signal(signal.SIGINT, handler)
  
  print('Event loop starting')
  loop = asyncio.SelectorEventLoop()
  asyncio.set_event_loop(loop)
  loop.run_forever()
  print('Event loop ended')
  </code></pre>
  
  <p>See <a href="https://groups.google.com/forum/#!topic/python-tulip/pr9fgX8Vh-A" rel="noreferrer">discussion</a> on official (Tulip) mailing list.</p>