Skip to content

Instantly share code, notes, and snippets.

@saghul
Created September 17, 2012 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saghul/3739834 to your computer and use it in GitHub Desktop.
Save saghul/3739834 to your computer and use it in GitHub Desktop.
Tornado backdoor example
import signal
from tornado.ioloop import IOLoop
from tornado_backdoor import BackdoorServer
def handle_SIGINT(signum, frame):
io_loop = IOLoop.instance()
io_loop.add_callback(io_loop.stop)
if __name__ == '__main__':
signal.signal(signal.SIGINT, handle_SIGINT)
server = BackdoorServer()
server.listen(1234)
IOLoop.instance().start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment