while not lock:
with bb.utils.timeout(3):
lock = bb.utils.lockfile(lockfile, shared=False, retry=False, block=True)
+ if lock:
+ # We hold the lock so we can remove the file (hide stale pid data)
+ bb.utils.remove(lockfile)
+ bb.utils.unlockfile(lock)
+ return
+
if not lock:
# Some systems may not have lsof available
procs = None
if procs:
msg += ":\n%s" % str(procs)
print(msg)
- return
- # We hold the lock so we can remove the file (hide stale pid data)
- bb.utils.remove(lockfile)
- bb.utils.unlockfile(lock)
def idle_commands(self, delay, fds=None):
nextsleep = delay