
















> If for some reason you need lots of separate subprocesses, use the zygote pattern: fork+exec one zygote process, then every time you need a new subprocess, fork the zygote.
>
> There are edge cases where these don't apply, but adding complex new kernel interfaces that give tiny wins on edge cases does not seem like a good idea.
Most of those edge cases are probably covered by some obscure config option in systemd (which is already designed to execute arbitrary programs in arbitrary environments). But nobody wants to faff with systemd config files, hence everyone ends up reinventing the wheel instead.
I think the real win would be getting systemd to provide a nice clean posix_spawn-flavored programmatic interface so that you don't have to deal with unit files. Or if such an interface already exists, evangelizing it and getting people to use it.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。