How to stop the tornado web server with ctrl+c?

后端 未结 4 1464
北荒
北荒 2021-02-05 13:21

I am new to tornado web server. When I start the tornado web server using python main_tornado.py It is working. Please see the below code.

import tornado.ioloop
         


        
4条回答
  •  一整个雨季
    2021-02-05 13:44

    The code is OK. The CTRL+C generates KeyboardInterrupt. To stop the server you can use CTRL+Pause Break(on windows) instead of CTRL+C. On linux CTRL+C also generates the KeyboardInterrupt also. If you will use CTRL+Z program will stop but port gets busy.

提交回复
热议问题