fork() 炸弹在流程方面的解释?

fork() bomb explanation in terms of processes?

我只是想知道叉形炸弹是如何工作的,我知道有类似的问题,但答案并不是我想要的(或者我只是没能找到)

它在流程方面是如何运作的?

是否children不断生产然后自我复制?摆脱它的唯一方法是重新启动系统吗?

分叉炸弹会对系统造成长期的影响吗?

谢谢!

How does it work in terms of processes?

它创建了太多进程,以至于系统无法再创建。

Do children keep being produced and then replicating themselves?

是的,fork in the name means replication

is the only way to get out of it is by rebooting the system?

不,它可以通过一些自动安全措施来阻止,例如。限制每个用户的进程数。

Are there any long lasting consequences on the system because of a fork bomb?

fork 炸弹本身不会更改任何数据,但会暂时(在运行时)导致超时、服务无法访问或 OOM。一个设计良好的系统应该可以解决这个问题,但是,现实可能会有所不同。