简体   繁体   中英

How to force a Python script run in background on Linux

Is it possible? For example the script understands if it was executed not in background and it closes and reopens in background with nohup python3 script.py & ? Can I do that with sys.argv ?

可以。您可以将其注册为服务。此站点可能对您有所帮助: 如何使Python脚本像Linux中的服务或守护程序一样运行

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM