diff options
author | Juan Pablo Canepa <jpcanepa@gmail.com> | 2020-12-07 17:53:57 -0300 |
---|---|---|
committer | Pat DeSantis <pdesantis3@gmail.com> | 2021-02-03 18:30:57 -0500 |
commit | 39968db6434f16f9fbd3c78f6c7392fd7ae9074e (patch) | |
tree | ef4a4f98f3c8be4d0906783a0768a7b5277c148b /docs/src | |
parent | 9c3d692b3941a2a4171629fb52af2e1029c415e8 (diff) | |
download | libuv-39968db6434f16f9fbd3c78f6c7392fd7ae9074e.tar.gz libuv-39968db6434f16f9fbd3c78f6c7392fd7ae9074e.zip |
macos: use posix_spawn instead of fork
Applications running on hardened runtime based on Chromium/Electron
create mmap regions using MAP_JIT flag. With macOS Big Sur the fork()
calls done by uv_spawn have become slow. This is because fork() seems
to physically copy all JIT memory regions (no-copy-on-write). On
previous OS, these regions weren't accessible at all in the forked
process, explaining the regression.
The fix is to use posix_spawn() on macOS. This spawns a new process
directly, without copying any memory mappings.
Note that fork() is still used on earlier versions of macOS if the
necessary posix_spawn() platform-specific extensions are not available.
Fixes: https://github.com/libuv/libuv/issues/3050
PR-URL: https://github.com/libuv/libuv/pull/3064
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Diffstat (limited to 'docs/src')
0 files changed, 0 insertions, 0 deletions