mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Close PID file
This commit is contained in:
parent
53c3113b44
commit
0a09804821
1 changed files with 2 additions and 1 deletions
|
@ -105,7 +105,8 @@ def run():
|
|||
if pid:
|
||||
sys.exit()
|
||||
elif config.get("server", "pid"):
|
||||
open(config.get("server", "pid"), "w").write(str(os.getpid()))
|
||||
with open(config.get("server", "pid"), "w") as pid_file:
|
||||
pid_file.write(str(os.getpid()))
|
||||
sys.stdout = sys.stderr = open(os.devnull, "w")
|
||||
|
||||
# Register exit function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue