[7/7] Revert "Revert "devshell: Use different termination test to avoid warnings""

Message ID 20260619072238.52120-8-amikan@ilbers.de
State New
Headers show
Series [1/7] wic: Update libs to v5.0.3 | expand

Commit Message

Anton Mikanovich June 19, 2026, 7:21 a.m. UTC
Reapply the patch because we still need it.

This reverts commit 865d0f4daae9be5ee48e96229a9cc6382db2eb58.
---
 meta/lib/oe/terminal.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 4412bc14..f1010c11 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -257,9 +257,11 @@  def spawn(name, sh_cmd, title=None, env=None, d=None):
     finally:
         os.unlink(pidfile)
 
+    # Test for /proc entry so that target pid can also be privileged
+    procpid = "/proc/%d" % pid
     while True:
         try:
-            os.kill(pid, 0)
+            os.stat(procpid)
             time.sleep(0.1)
         except OSError:
            return