【问题标题】:Family hierarchy for forking processes分叉进程的家族层次结构
【发布时间】:2013-08-27 15:42:16
【问题描述】:

我目前正在研究如何分叉(复制)一个进程。分叉的结果是有一个父进程和一个子进程。我的问题是:

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?

我正在等待“可能”或“不可能”的回答,但在流程管理方面给出一些理由使其“不可能”(如果不可能:) )。

谢谢!

【问题讨论】:

  • 我想不出为什么你不能分叉一个分叉的进程,但这并不是我真正擅长的领域......

标签: process fork


【解决方案1】:

可能。

P-1.1 只是另一个进程,它是一个子进程这一事实没有任何区别。

只需从 P-1.1 调用 fork,就会创建一个新的子进程 (P-1.1.1)。

【讨论】:

    猜你喜欢
    • 2018-10-10
    • 1970-01-01
    • 1970-01-01
    • 2021-05-19
    • 1970-01-01
    • 1970-01-01
    • 2010-12-24
    • 1970-01-01
    • 2020-11-30
    相关资源
    最近更新 更多