* [bitbake-devel][PATCH] server: Fix crash when checking lock file
@ 2023-05-31 19:45 Joshua Watt
0 siblings, 0 replies; only message in thread
From: Joshua Watt @ 2023-05-31 19:45 UTC (permalink / raw)
To: bitbake-devel; +Cc: Joshua Watt
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
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
bitbake/lib/bb/server/process.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index db417c84280..7616ef53c89 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -375,7 +375,7 @@ class ProcessServer():
lock = bb.utils.lockfile(lockfile, shared=False, retry=False, block=False)
if not lock:
newlockcontents = get_lock_contents(lockfile)
- if not newlockcontents[0].startswith([os.getpid() + "\n", os.getpid() + " "]):
+ if not newlockcontents[0].startswith([f"{os.getpid()}\n", f"{os.getpid()} "]):
# A new server was started, the lockfile contents changed, we can exit
serverlog("Lockfile now contains different contents, exiting: " + str(newlockcontents))
return
--
2.33.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-31 19:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-31 19:45 [bitbake-devel][PATCH] server: Fix crash when checking lock file Joshua Watt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).