diff --git a/src/ktools/locks.py b/src/ktools/locks.py index 3f49576..b2e6213 100644 --- a/src/ktools/locks.py +++ b/src/ktools/locks.py @@ -1,9 +1,11 @@ from fcntl import LOCK_EX, LOCK_UN, flock +from os import getuid from tempfile import gettempdir, gettempprefix from .pathlib import Path -_KTOOLS_TEMPLOCK = Path(gettempdir(), f'{gettempprefix()}-ktools-lockfile') +_KTOOLS_TEMPLOCK = Path( + gettempdir(), f'{gettempprefix()}-ktools-lockfile-{getuid()}') _KTOOLS_TEMPLOCK.touch(exist_ok=True)