如果我找到disown一份工作bash并改变主意,我可以以某种方式撤消它吗?
如果是这样,更进一步,是否可以将任意流程置于作业控制之下(可接受的限制是我拥有该流程)?
最后,这是否会使以下工作流程成为可能:
^z后跟bg)jobs -p %+获取它的<pid>)screen或tmux会话,附加到它并将其用于以下步骤reptyr抢的作业(reptyr <pid>)<pid>到 shell 的作业控制(这可能吗?)^Z)除了最后两步,我什么都能做。停止作业^Z不起作用,因为该进程不在 shell 的作业列表中。
我的研究表明不可能拥有(反向disown)一个 pid 但希望我错了......
考虑以下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使用此工具或其他工具?