-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
I apologize if this is an ignorant question. I have a parent process which spawns two children and I need one of the children (created via multiprocessing) to be able to ptrace the other (started via subprocess.Popen) but I am recieving the permission error: ptrace.error.PtraceError: ptrace(cmd=16, pid=15151, 0, 0) error #1: Operation not permitted
Here is sample code that demonstrates what I am trying to do and the error I am encountering:
import multiprocessing
import subprocess
import time
import ptrace.debugger
def ptrace_test(pid):
debugger = ptrace.debugger.PtraceDebugger()
process = debugger.addProcess(pid, False)
# Other stuff
child = subprocess.Popen("/usr/bin/ls")
proc = multiprocessing.Process(target=ptrace_test, args=(child.pid,))
proc.start()
proc.join()
Metadata
Metadata
Assignees
Labels
No labels