3 ms·
Shells should really use `vfork()` to exec, and `fork()` for subshells (maybe).
by cryptonector 4y ago
Shells should really use `vfork()` to exec, and `fork()` for subshells (maybe).
- mort96 4y agoExcept that the set of things you are allowed to do after vfork() and before exec() is extremely small. I agree that things should use vfork or posix_spawn when possible, but it wouldn't surprise me at all if there's a similar list of cases when a vfork() path wouldn't be possible.
- cryptonector 4y agoThat set was made artificially small by the Open Group, but is not actually that small.