Compare commits

...

2 Commits
test ... master

Author SHA1 Message Date
Jan Petykiewicz 260d67bf81 update gitignore 5 years ago
Jan Petykiewicz 4deaa41d7e whitespace fixes 5 years ago

1
.gitignore vendored

@ -4,4 +4,5 @@ __pycache__
*.pyc
*.egg-info/
build/
dist/

@ -40,7 +40,7 @@ def ptrace(command: int, pid: int = 0, arg1: int = 0, arg2: int = 0) -> int:
"""
Call ptrace() with the provided pid and arguments. See the ```man ptrace```.
"""
logger.debug('ptrace({}, {}, {}, {})'.format(command, pid, arg1, arg2))
logger.debug('ptrace({}, {}, {}, {})'.format(command, pid, arg1, arg2))
result = _ptrace(command, pid, arg1, arg2)
if result == -1:
err_no = ctypes.get_errno()
@ -58,7 +58,7 @@ class Process(AbstractProcess):
self.pid = process_id
def close(self):
os.kill(self.pid, signal.SIGSTOP)
os.kill(self.pid, signal.SIGSTOP)
ptrace(ptrace_commands['PTRACE_DETACH'], self.pid, 0, 0)
self.pid = None
@ -78,7 +78,7 @@ class Process(AbstractProcess):
with open('/proc/{}/cmdline', 'rb') as f:
return f.read().decode().split('\x00')[0]
except FileNotFoundError:
return ''
return ''
@staticmethod
def list_available_pids() -> List[int]:

Loading…
Cancel
Save