summaryrefslogtreecommitdiff
path: root/psutil/_psaix.py
diff options
context:
space:
mode:
authorwiggin15 <wiggin15@yahoo.com>2017-09-27 18:50:46 +0300
committerGiampaolo Rodola <g.rodola@gmail.com>2017-09-27 23:50:46 +0800
commitda68e02d1f84de6821b0468aaaa3e7475c6d0e49 (patch)
treef765cf23073fa536bb096664d65550d0c26c97f2 /psutil/_psaix.py
parent12109ee217c247cf68735589fa55e6c721e463fc (diff)
downloadpsutil-da68e02d1f84de6821b0468aaaa3e7475c6d0e49.tar.gz
Fix #1136: check PID in AIX in procfs (#1137)
The 'kill' method to check whether processes exist doesn't work on 'wait' processes in AIX. All processes (and only processes) have a "psinfo" file in procfs so we can check whether PIDs exist there.
Diffstat (limited to 'psutil/_psaix.py')
-rw-r--r--psutil/_psaix.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/psutil/_psaix.py b/psutil/_psaix.py
index 2cbacacb..663748bb 100644
--- a/psutil/_psaix.py
+++ b/psutil/_psaix.py
@@ -321,7 +321,7 @@ def pids():
def pid_exists(pid):
"""Check for the existence of a unix pid."""
- return _psposix.pid_exists(pid)
+ return os.path.exists(os.path.join(get_procfs_path(), str(pid), "psinfo"))
def wrap_exceptions(fun):