我目前正在研究如何分叉(复制)流程。分叉的结果是有一个Parent进程和一个Child进程。我的问题是:
Let's suppose we have the process P-1.
We forked P-1, and we obtained a child process P-1.1.
I know that is possible to fork P-1 again and obtain P-1.2.
But my question is :
Is is possible to fork the process P-1.1 and obtain a GrandChild for P-1 that we can call P-1.1.1?
我正在等待"可能"或"不可能"的答案,但在流程管理方面给出一些原因,使其成为"不可能的"(如果不可能:))。
谢谢!
可能。
p-1.1只是另一个过程,事实上它是一个孩子并没有什么区别。
只需从p-1.1调用fork,就会创建一个新的子进程(p-1.1.1)。