def create_pid_file(self):
fd = open(self._pid_file, 'wb')
fcntl.lockf(fd, fcntl.LOCK_EX)
timestamp = time.strftime('%Y-%m-%d %H:%M:%S')
fd.write(self._pid + ";" + timestamp)
fd.close()
return True
pid_control.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录