summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2023-05-31 14:42:46 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-06-01 08:08:33 +0100
commit28a7202ac5589d25816dbbd0f6f47a3e70eb7684 (patch)
tree6eea058778ee90ba276da48cb0d7f14059a88681
parent1f6778c738cacefd5cfc4fd343c12db8ff7a092a (diff)
downloadpoky-28a7202ac5589d25816dbbd0f6f47a3e70eb7684.tar.gz
bitbake: server: Fix crash when checking lock file
Fixes a crash when the server process attempts to check the PID of the lock file that resulted because an integer (os.getpid()) was attempting to be concatenated to a string (Bitbake rev: 5d499682a0a739b5269247a8f6dbb874e3eec456) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/server/process.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index db417c8428..7616ef53c8 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -375,7 +375,7 @@ class ProcessServer():
375 lock = bb.utils.lockfile(lockfile, shared=False, retry=False, block=False) 375 lock = bb.utils.lockfile(lockfile, shared=False, retry=False, block=False)
376 if not lock: 376 if not lock:
377 newlockcontents = get_lock_contents(lockfile) 377 newlockcontents = get_lock_contents(lockfile)
378 if not newlockcontents[0].startswith([os.getpid() + "\n", os.getpid() + " "]): 378 if not newlockcontents[0].startswith([f"{os.getpid()}\n", f"{os.getpid()} "]):
379 # 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
380 serverlog("Lockfile now contains different contents, exiting: " + str(newlockcontents)) 380 serverlog("Lockfile now contains different contents, exiting: " + str(newlockcontents))
381 return 381 return