nohup python3 -u socket_test.py >my_socket.log 2>&1 &
开启以后会显示 进程ID 后面可以利用这个ID杀死后台进程 忘记了下面也有办法查询1. 最后一个“&”
2021-05-23