发布时间:2014-01-10 10:54:02
网上发现一个好工具。看中哪个进程,用reptyr将该进程的控制终端接手过来,挺过瘾的。reptyr is a utility for taking an existing running program and attaching it to a new terminal. https://github.com/nelhage/reptyr大致原理:利用ptrace利器接上目标进程,通过系统调用dup2和ioctl将标准输入输出和控制.........【阅读全文】