























> Why not go further? Be able to spawn a process with an empty set of FDs, address space, etc, then load an executable yourself. This would also allow for moving more exec() loader responsibilities into userspace.
How it could be useful: with an empty list of FD, there is no way to communicate; without any memory sharing, all the parameter (like the executable path, arguments) has to be "hard coded" in the code...
Unfortunately, the true is that the parent and the child have to have something in common (at least some file descriptors to communicate). But other things can be shared, like shared memory , privileges....
I am curious to see some numbers about the cost of fork+exec vs the zygote patter, just to understand if it is a common problem, or it is only a problem of some edge case.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。