From 1d6502be1df36664fc36492ae37c74b164de9a6e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 13 Nov 2023 17:08:24 +0100 Subject: [PATCH] Also log command line for still running process --- mock/py/mockbuild/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mock/py/mockbuild/util.py b/mock/py/mockbuild/util.py index f435c79ae..df66b6bee 100644 --- a/mock/py/mockbuild/util.py +++ b/mock/py/mockbuild/util.py @@ -177,6 +177,8 @@ def orphansKill(rootToKill, manual_forced=False): root = os.readlink("/proc/%s/root" % fn) if compare_two_paths_cached(root, rootToKill, path_cache): getLog().warning("Process ID %s still running in chroot. Killing with %s...", fn, killsig) + with open(f"/proc/{fn}/cmdline", encoding="utf-8") as f: + getLog().warning("Process is %s", f.readline()) pid = int(fn, 10) os.kill(pid, killsig) os.waitpid(pid, 0)