From 1272150610283c842a1d5f71a213414b81c0566b Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Sun, 1 May 2016 00:59:33 +0200 Subject: [PATCH] set ppid --- psutil/_psbsd.py | 3 ++- psutil/_psosx.py | 3 ++- psutil/_pssunos.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/psutil/_psbsd.py b/psutil/_psbsd.py index 76d6d588c..990ecd51b 100644 --- a/psutil/_psbsd.py +++ b/psutil/_psbsd.py @@ -463,7 +463,8 @@ def terminal(self): @wrap_exceptions def ppid(self): - return cext.proc_ppid(self.pid) + self._ppid = cext.proc_ppid(self.pid) + return self._ppid @wrap_exceptions def uids(self): diff --git a/psutil/_psosx.py b/psutil/_psosx.py index 77e5ed58e..c5021ce14 100644 --- a/psutil/_psosx.py +++ b/psutil/_psosx.py @@ -250,7 +250,8 @@ def environ(self): @wrap_exceptions def ppid(self): - return cext.proc_ppid(self.pid) + self._ppid = cext.proc_ppid(self.pid) + return self._ppid @wrap_exceptions def cwd(self): diff --git a/psutil/_pssunos.py b/psutil/_pssunos.py index bca545272..82fa38f7a 100644 --- a/psutil/_pssunos.py +++ b/psutil/_pssunos.py @@ -359,7 +359,8 @@ def nice_set(self, value): @wrap_exceptions def ppid(self): - return cext.proc_basic_info(self.pid, self._procfs_path)[0] + self._ppid = cext.proc_basic_info(self.pid, self._procfs_path)[0] + return self._ppid @wrap_exceptions def uids(self):