title: How do you inject code onto a process without ptrace
body: <p>Is there a way to inject code into an ELF binary without <code>ptrace</code>, I can't use it since the program I'm writing this for is using GDB and I don't want to stop the process for the while it's injecting. I read it's possible by using <code>/proc/pid/mem</code> but I couldn't quite find anything about how to do it. I don't want to use <code>LD_PRELOAD</code> either since it would require restarting the program and I'd want to do it during runtime.</p>
  
  <p>EDIT: I can't use ptrace since the process might already be attached to by gdb</p>