diff options
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/lib/bb/main.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py index 07972f69e5..6e6a346a06 100755 --- a/bitbake/lib/bb/main.py +++ b/bitbake/lib/bb/main.py | |||
@@ -446,7 +446,15 @@ def setup_bitbake(configParams, configuration, extrafeatures=None): | |||
446 | logger.info("Reconnecting to bitbake server...") | 446 | logger.info("Reconnecting to bitbake server...") |
447 | if not os.path.exists(sockname): | 447 | if not os.path.exists(sockname): |
448 | print("Previous bitbake instance shutting down?, waiting to retry...") | 448 | print("Previous bitbake instance shutting down?, waiting to retry...") |
449 | time.sleep(5) | 449 | i = 0 |
450 | lock = None | ||
451 | # Wait for 5s or until we can get the lock | ||
452 | while not lock and i < 50: | ||
453 | time.sleep(0.1) | ||
454 | _, lock = lockBitbake() | ||
455 | i += 1 | ||
456 | if lock: | ||
457 | bb.utils.unlockfile(lock) | ||
450 | raise bb.server.process.ProcessTimeout("Bitbake still shutting down as socket exists but no lock?") | 458 | raise bb.server.process.ProcessTimeout("Bitbake still shutting down as socket exists but no lock?") |
451 | if not configParams.server_only: | 459 | if not configParams.server_only: |
452 | try: | 460 | try: |