title: Python: Tornado ioloop killed with no exceptions on KeyboardInterrupt
body: <p>When I press <code>^C</code> when blocking on tornado's <code>ioloop.start()</code> in the following program, Python quits immediately and no KeyboardInterrupt (or any other exception) is raised. What is going on and how can I catch <code>^C</code>?</p>
  
  <pre><code>import tornado.ioloop
  import tornado.web
  ioloop = tornado.ioloop.IOLoop.instance()
  
  class MainHandler(tornado.web.RequestHandler):
      def get(self):
          self.write("Hello, world")
  
  application = tornado.web.Application([
      (r"/", MainHandler),
  ])
  
  
  if __name__ == "__main__":
      application.listen(8888)
  
      # has no effect
      # tornado.ioloop.PeriodicCallback(lambda:None, 1000).start()
  
      print 'starting'
  
      try:
          ioloop.start()
      except KeyboardInterrupt:
          print '^C pressed'
  
      finally:
          print 'done'
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>$ /c/Python27x32/python test.py
  starting
  
  $
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>$ /c/Python27x32/python test.py
  starting
  ^C pressed
  done
  
  $
  </code></pre>
  
  <p>I'm running:</p>
  
  <ul>
  <li>Windows 8.0 x64,</li>
  <li>Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32</li>
  <li>tornado==3.2</li>
  </ul>