nelhage / reptyr

Reparent a running program to a new terminal
MIT License
5.71k stars 216 forks source link

Unable to attach to PID #142

Closed konsbn closed 1 year ago

konsbn commented 1 year ago

I am unable to attach a process to another terminal after running reptyr $PID here is the error message

Unable to attach to pid 208134: Operation not permitted
The kernel denied permission while attaching. If your uid matches
the target's, check the value of /proc/sys/kernel/yama/ptrace_scope.
For more information, see /etc/sysctl.d/10-ptrace.conf

Value of cat /proc/sys/kernel/yama/ptrace_scope is 1 and the directory /etc/sysctl.d/10-ptrace.conf is empty. My system configuration is Linux Wildebeest 5.19.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 21 Aug 2022 18:55:22 +0000 x86_64 GNU/Linux Please help me resolve this issue. Thanks

konsbn commented 1 year ago

Just needed to do echo 0 > /proc/sys/kernel/yama/ptrace_scope Sorry!