Skip to content

Commit

Permalink
CA-392823: pid_is_alive expects pid to be an int.
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Syms <mark.syms@cloud.com>
  • Loading branch information
MarkSymsCtx committed May 16, 2024
1 parent 54e17e9 commit 293fb74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,7 @@ def findRunningProcessOrOpenFile(name, process=True):
# There is no specific guarantee of when a PID's /proc directory will disappear
# when it exits, particularly relative to filedescriptor cleanup, so we want to
# make sure we're not reporting a false positive.
processandpids = [ x for x in processandpids if pid_is_alive(x[1]) ]
processandpids = [x for x in processandpids if pid_is_alive(int(x[1]))]
for pp in processandpids:
SMlog(f"File {name} has an open handle with process {pp[0]} with pid {pp[1]}")

Expand Down

0 comments on commit 293fb74

Please sign in to comment.