änderungen für mac

This commit is contained in:
marcusH
2026-06-21 11:40:15 +02:00
parent fe9973f831
commit a89c3df49b
4549 changed files with 576393 additions and 0 deletions
@@ -0,0 +1,19 @@
import os
from .posix import PosixProcessProvider
class ProcfsProvider(PosixProcessProvider):
def pid2exe(self, pid):
try:
return os.readlink('/proc/%d/file' % pid)
except (OSError, IOError):
return None
def ppid_of(self, pid=None):
if pid is None:
return os.getppid()
try:
return int(next(open('/proc/%d/status' % pid)).split()[3])
except (OSError, ValueError, IOError):
return None