mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] add warning comment about unconcurrency safe _remove_lock function
This commit is contained in:
parent
1d59738085
commit
ebe5cab099
1 changed files with 1 additions and 0 deletions
|
@ -573,6 +573,7 @@ def _give_lock(action, service, p):
|
|||
return son_PID
|
||||
|
||||
def _remove_lock(PID_to_remove):
|
||||
# FIXME ironically not concurrency safe because it's not atomic...
|
||||
|
||||
PIDs = filesystem.read_file(MOULINETTE_LOCK).split("\n")
|
||||
PIDs_to_keep = [ PID for PID in PIDs if int(PID) != PID_to_remove ]
|
||||
|
|
Loading…
Add table
Reference in a new issue