2 ms·
>It feels crazy that we don't have a way to directly express the latter thing Isn't that what posix_spawn is for?
by 7jjjjjjj 4mo ago
>It feels crazy that we don't have a way to directly express the latter thing
Isn't that what posix_spawn is for?
- yxhuvud 4mo agoAnd how do you think posix_spawn is implemented?
- JdeBP 4mo agoThis is an oft-overlooked point. An obvious place to look for improving fork+execve is to see whether posix_spawn can be given more efficient kernel mechanisms to be based upon. And of course that has already been done. On NetBSD, posix_spawn() is a fully-fledged system call and much of the work is done in kernel mode. * https://blog.netbsd.org/tnf/entry/posix_spawn_syscall_added https://blog.netbsd.org/tnf/entry/posix_spawn_syscall_added
- toast0 4mo agoposix_spawn addresses the need from userspace. Under the hood, it's still doing more or less a fork/exec, with the baggage that comes with it. A syscall would be nicer.