mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
use rlock so blocking can be passed in py2
This commit is contained in:
parent
d346b42332
commit
de98be6093
@ -112,7 +112,7 @@ def minion_process():
|
|||||||
def handle_hup(manager, sig, frame):
|
def handle_hup(manager, sig, frame):
|
||||||
manager.minion.reload()
|
manager.minion.reload()
|
||||||
|
|
||||||
lock = threading.Lock()
|
lock = threading.RLock()
|
||||||
|
|
||||||
def suicide_when_without_parent(parent_pid):
|
def suicide_when_without_parent(parent_pid):
|
||||||
'''
|
'''
|
||||||
@ -156,7 +156,7 @@ def minion_process():
|
|||||||
log.info('waiting random_reauth_delay %ss', delay)
|
log.info('waiting random_reauth_delay %ss', delay)
|
||||||
time.sleep(delay)
|
time.sleep(delay)
|
||||||
sys.exit(salt.defaults.exitcodes.SALT_KEEPALIVE)
|
sys.exit(salt.defaults.exitcodes.SALT_KEEPALIVE)
|
||||||
except SystemExit:
|
except BaseException:
|
||||||
lock.acquire(blocking=True)
|
lock.acquire(blocking=True)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user