diff options
author | Jameson Nash <vtjnash@gmail.com> | 2022-03-02 15:15:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-02 15:15:39 -0500 |
commit | 83efa3dd7140ef16e9d8fcde42011450f0c229e6 (patch) | |
tree | 4c3448c002fe83190959223a587c5c91785b6f8b /docs/src | |
parent | 56e279021f751699500e5f3c958e3fcdff3ec7cf (diff) | |
download | libuv-83efa3dd7140ef16e9d8fcde42011450f0c229e6.tar.gz libuv-83efa3dd7140ef16e9d8fcde42011450f0c229e6.zip |
Reland "macos: use posix_spawn instead of fork" (#3257)
Fixes: https://github.com/libuv/libuv/issues/3050
Refs: https://github.com/libuv/libuv/issues/3086
Refs: https://github.com/libuv/libuv/pull/3064
Refs: https://github.com/libuv/libuv/pull/3107
Refs: https://github.com/libuv/libuv/pull/3064
This reverts commit 217fdf4265589889d00c7c0622fde2710971a020, then fixes
several issues with it:
* remove error fast-cleanup code that triggers a nodejs bug
Refs: https://github.com/libuv/libuv/pull/3107#issuecomment-782482608
* protect posix_spawn from EINTR
This is not a documented valid error, but seems to have been observed.
* ignore setuid/setgid syscall
This kernel function is not permitted unless the process is setuid root,
so disable this syscall. Falling back to fork/exec should be okay for
the rare cases that the user decides they need to do setuid(getuid()) or
setuid(geteuid()) for the child.
Refs: https://github.com/libuv/libuv/pull/3107#issuecomment-782482608
* improve posix_spawn path search
Ports the improvements in musl back to this function
* fix some additional problems and formatting issues
We previously might fail to start a watcher, in rare failure cases,
resulting in a zombie that we would fail to kill. Also avoid creating
the signal-pipe unless required (addresses a review comment from Apple)
* fix fd->fd mapping reuse
There was a chance that when duplicating the fd's into stdio_count+fd we
might be closing a currently opened fd with that value.
Diffstat (limited to 'docs/src')
0 files changed, 0 insertions, 0 deletions