Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
aerzen
· 5mo ago · 0 comments
Spawning processes should not be on the hot path of any program.
Comments
[–]
1718627440
5mo ago
Why? That's a very useful processing primitive.
[–]
lokar
5mo ago
It’s a hack with many disadvantages. Sometimes a hack is the right answer, but the kernel should it add a primitive for it.
[–]
MBCook
5mo ago
Should bash link in every program the user might want? Load them up as dynamic libraries?
[–]
lokar
5mo ago
Bash as an interactive tool is very different. It is used to run an almost arbitrary number of things, and a pretty low rate.
Bash as a programming language is just a bad idea.
[–]
m132
5mo ago
Node, Python, PowerShell, and the rest do (almost) just that. launchd and systemd famously strived to remove as much shell from the start up process as possible because it was harming boot times and introducing unpredictability.
[–]
sanderjd
5mo ago
Aren't we discussing just such a primitive?
[–]
lokar
5mo ago
oh, sorry, typo
s/it/not/
[–]
pizlonator
5mo ago
It ends up on the hot path of programs that use process isolation aggressively
[–]
lokar
5mo ago
Sure, and there a primary thing you want is a whole new environment/context for the child (new environment, fds, memory, cgroups, namespaces, etc).