mirror of
https://github.com/Kozea/Radicale.git
synced 2025-09-15 20:36:55 +00:00
Style
This commit is contained in:
parent
95fe2b6824
commit
e7ce00d54f
6 changed files with 53 additions and 36 deletions
|
@ -102,11 +102,12 @@ def run():
|
|||
# Check and create PID file in a race-free manner
|
||||
if config.get("server", "pid"):
|
||||
try:
|
||||
pid_fd = os.open(config.get("server", "pid"),
|
||||
os.O_CREAT | os.O_EXCL | os.O_WRONLY)
|
||||
pid_fd = os.open(
|
||||
config.get("server", "pid"),
|
||||
os.O_CREAT | os.O_EXCL | os.O_WRONLY)
|
||||
except:
|
||||
raise OSError("PID file exists: %s" %
|
||||
config.get("server", "pid"))
|
||||
raise OSError(
|
||||
"PID file exists: %s" % config.get("server", "pid"))
|
||||
pid = os.fork()
|
||||
if pid:
|
||||
sys.exit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue