3 ms·
> being able to inexpensively spawn a carefully tailored process regardless of the size and scope of the current process would be better. It's called clone(2)
by PaulDavisThe1st 5mo ago
> being able to inexpensively spawn a carefully tailored process regardless of the size and scope of the current process would be better.
It's called clone(2)
- trumpdong 5mo agoWhich argument to clone starts the process with an empty address space?
- toast0 5mo agoadding on the the sibling, what argument to clone allows me to set the fds of the child? AFAIK, you either share the FD table with the parent, or get a copy of it. If the parent has 1 million FDs open and the child doesn't want most of those, dealing with that has real costs. Many applications that tend to have large numbers of FDs and also fork/exec will mitigate the cost by spawning a process during startup that they can then use to spawn processes during runtime without doing it from the main process; this is a nice mitigation, but it shows a missing interface.