diff options
Diffstat (limited to 'bitbake/lib/bb/server/process.py')
| -rw-r--r-- | bitbake/lib/bb/server/process.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 529196b78c..8d12f00bd4 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py | |||
| @@ -361,20 +361,21 @@ class ProcessServer(): | |||
| 361 | except FileNotFoundError: | 361 | except FileNotFoundError: |
| 362 | return None | 362 | return None |
| 363 | 363 | ||
| 364 | lockcontents = get_lock_contents(lockfile) | ||
| 365 | serverlog("Original lockfile contents: " + str(lockcontents)) | ||
| 366 | |||
| 367 | lock.close() | 364 | lock.close() |
| 368 | lock = None | 365 | lock = None |
| 369 | 366 | ||
| 370 | while not lock: | 367 | while not lock: |
| 371 | i = 0 | 368 | i = 0 |
| 372 | lock = None | 369 | lock = None |
| 370 | if not os.path.exists(os.path.basename(lockfile)): | ||
| 371 | serverlog("Lockfile directory gone, exiting.") | ||
| 372 | return | ||
| 373 | |||
| 373 | while not lock and i < 30: | 374 | while not lock and i < 30: |
| 374 | lock = bb.utils.lockfile(lockfile, shared=False, retry=False, block=False) | 375 | lock = bb.utils.lockfile(lockfile, shared=False, retry=False, block=False) |
| 375 | if not lock: | 376 | if not lock: |
| 376 | newlockcontents = get_lock_contents(lockfile) | 377 | newlockcontents = get_lock_contents(lockfile) |
| 377 | if newlockcontents != lockcontents: | 378 | if not newlockcontents.startswith([os.getpid() + "\n", os.getpid() + " "]): |
| 378 | # A new server was started, the lockfile contents changed, we can exit | 379 | # A new server was started, the lockfile contents changed, we can exit |
| 379 | serverlog("Lockfile now contains different contents, exiting: " + str(newlockcontents)) | 380 | serverlog("Lockfile now contains different contents, exiting: " + str(newlockcontents)) |
| 380 | return | 381 | return |
