python应用启动

在ssh终端通过python python.py 启动时,是基于当前ssh进程启动的,当ssh终端断开连接后,python应用随即也会被kill。

如果想要在后台运行,可通过nohup启动。

如下:

nohup python3 /home/code/pyhttpserver/cmtpsvr.py >/home/code/pyhttpserver/cmtpsvr.log 2>&1 &