File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 3535
3636def process_exe (process : psutil .Process ) -> str :
3737 """
38- psutil.Process(pid).exe() returns "" for zombie processes, incorrectly. It should raise ZombieProcess, and return ""
39- only for kernel threads.
40-
41- See https://github.com/giampaolo/psutil/pull/2062
38+ psutil.Process(pid).exe() caches the result. This function returns the up-to-date exe in case the process exec-ed.
4239 """
43- # Clear the "exe" cache on the process object. It can change after being cached if the process execed.
40+ # Clear the "exe" cache on the process object
4441 process ._exe = None # type: ignore
4542 exe = process .exe ()
4643 if exe == "" :
47- if is_process_zombie (process ):
48- raise psutil .ZombieProcess (process .pid )
4944 raise MissingExePath (process )
5045 return exe
5146
You can’t perform that action at this time.
0 commit comments