python判斷自身是否正在運行

# coding: utf-8 import os import psutil import time def write_pid(): pid = os.getpid() fp = open("pid.log",'w') fp.write(str(pid)) fp.close() def read_pid(): if os.path.exists("p
相關文章
相關標籤/搜索