| Message ID | 20260303162427.938147-1-JPEWhacker@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | [bitbake-devel] bitbake-worker: Use Lock from bb.multiprocessing | expand |
diff --git a/bin/bitbake-worker b/bin/bitbake-worker index d2b146a6a..aa14ef191 100755 --- a/bin/bitbake-worker +++ b/bin/bitbake-worker @@ -23,9 +23,10 @@ import queue import shlex import subprocess import fcntl -from multiprocessing import Lock from threading import Thread +Lock = bb.multiprocessing.Lock + # Remove when we have a minimum of python 3.10 if not hasattr(fcntl, 'F_SETPIPE_SZ'): fcntl.F_SETPIPE_SZ = 1031
bitbake-worker relies on multiprocessing using the "fork" method to pass data to the child process. Starting in Python 3.13 the default changed to "forkserver", so the bb.multiprocessing context needs to be used in order to preserve the "fork" method. Note that bb.multiprocessing is a context, so Lock can't be imported from it; instead a local alias for Lock must be used Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> --- bin/bitbake-worker | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)