Skip to content

Commit

Permalink
Also log command line for still running process
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed Nov 13, 2023
1 parent ba2a10b commit 7242087
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mock/py/mockbuild/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("/proc/%s/cmdline" % fn) as f:

Check warning

Code scanning / vcs-diff-lint

orphansKill: Using open without explicitly specifying an encoding Warning

orphansKill: Using open without explicitly specifying an encoding
getLog().warning("Process is %s", f.readline())
pid = int(fn, 10)
os.kill(pid, killsig)
os.waitpid(pid, 0)
Expand Down

0 comments on commit 7242087

Please sign in to comment.