考虑以下Makefile。
all:
yes
Run Code Online (Sandbox Code Playgroud)
如果我运行make并暂停 using Ctrl-Z,然后启动screenor tmux,然后尝试reptyr,我会收到以下错误。
$ reptyr 5328
[-] Process 5329 (yes) shares 5328's process group. Unable to attach.
(This most commonly means that 5328 has suprocesses).
Unable to attach to pid 5328: Invalid argument
Run Code Online (Sandbox Code Playgroud)
确实make有子流程,但是有没有办法reptyr使用此工具或其他工具?
小智 11
reptyr0.6 版引入了-T“tty-stealing”模式选项,该模式适用于有子进程的进程。
有关更多详细信息,请参阅https://blog.nelhage.com/2014/08/new-reptyr-feature-tty-stealing/ 。