Provides the parent pid (even for older versions of Python on Windows).
(self)
| 1025 | py_db.variable_presentation = variable_presentation |
| 1026 | |
| 1027 | def get_ppid(self): |
| 1028 | """ |
| 1029 | Provides the parent pid (even for older versions of Python on Windows). |
| 1030 | """ |
| 1031 | ppid = None |
| 1032 | |
| 1033 | try: |
| 1034 | ppid = os.getppid() |
| 1035 | except AttributeError: |
| 1036 | pass |
| 1037 | |
| 1038 | if ppid is None and IS_WINDOWS: |
| 1039 | ppid = self._get_windows_ppid() |
| 1040 | |
| 1041 | return ppid |
| 1042 | |
| 1043 | def _get_windows_ppid(self): |
| 1044 | this_pid = os.getpid() |
no test coverage detected