summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server/process.py
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2023-09-25 12:55:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-26 10:37:17 +0100
commit362c70a993ae954834a8deace68b3e4068282698 (patch)
tree32fbb49f1d3af22128482e2f029feced6e452c15 /bitbake/lib/bb/server/process.py
parent0dbc45e52fea7e7733e863d6afc193f418d733ce (diff)
downloadpoky-362c70a993ae954834a8deace68b3e4068282698.tar.gz
bitbake: bitbake/lib: spawn server/worker using the current Python interpreter
The user may have invoked ./bin/bitbake using a different Python interpreter than whatever python3 is on $PATH (for example, explicitly using a different version). However, as the server and workers are spawned directly they'll use the hashbang and thus a different Python. We also ensure that argv[0] is set to sys.executable instead of 'bitbake-server' or 'bitbake-worker', so that sys.executable is set to the right value inside the child. Without this the server won't be able to start any workers. (Bitbake rev: b44d5d2a53d3082c8ce94e09c0cf833e33e25aec) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server/process.py')
-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 5654f60f9e..d495ac6245 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -620,7 +620,7 @@ class BitBakeServer(object):
620 os.set_inheritable(self.bitbake_lock.fileno(), True) 620 os.set_inheritable(self.bitbake_lock.fileno(), True)
621 os.set_inheritable(self.readypipein, True) 621 os.set_inheritable(self.readypipein, True)
622 serverscript = os.path.realpath(os.path.dirname(__file__) + "/../../../bin/bitbake-server") 622 serverscript = os.path.realpath(os.path.dirname(__file__) + "/../../../bin/bitbake-server")
623 os.execl(sys.executable, "bitbake-server", serverscript, "decafbad", str(self.bitbake_lock.fileno()), str(self.readypipein), self.logfile, self.bitbake_lock.name, self.sockname, str(self.server_timeout or 0), str(int(self.profile)), str(self.xmlrpcinterface[0]), str(self.xmlrpcinterface[1])) 623 os.execl(sys.executable, sys.executable, serverscript, "decafbad", str(self.bitbake_lock.fileno()), str(self.readypipein), self.logfile, self.bitbake_lock.name, self.sockname, str(self.server_timeout or 0), str(int(self.profile)), str(self.xmlrpcinterface[0]), str(self.xmlrpcinterface[1]))
624 624
625def execServer(lockfd, readypipeinfd, lockname, sockname, server_timeout, xmlrpcinterface, profile): 625def execServer(lockfd, readypipeinfd, lockname, sockname, server_timeout, xmlrpcinterface, profile):
626 626