public inbox for bitbake-devel@lists.openembedded.org
 help / color / mirror / Atom feed
From: Joshua Watt <jpewhacker@gmail.com>
To: bitbake-devel@lists.openembedded.org
Cc: Joshua Watt <JPEWhacker@gmail.com>
Subject: [bitbake-devel][PATCH] bitbake-worker: Use Lock from bb.multiprocessing
Date: Tue,  3 Mar 2026 09:24:27 -0700	[thread overview]
Message-ID: <20260303162427.938147-1-JPEWhacker@gmail.com> (raw)

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(-)

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
-- 
2.53.0



                 reply	other threads:[~2026-03-03 16:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260303162427.938147-1-JPEWhacker@gmail.com \
    --to=jpewhacker@gmail.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox