fix: review comments

This commit is contained in:
bryopsida 2025-02-17 15:42:36 -06:00 committed by Jameson Nash
parent a263786c9d
commit 90557cb6f6
2 changed files with 4 additions and 5 deletions

View File

@ -103,7 +103,7 @@ Data types
* specified in the 'num_gids' field. This does not work on windows; * specified in the 'num_gids' field. This does not work on windows;
* setting this flag will cause uv_spawn() to fail. * setting this flag will cause uv_spawn() to fail.
*/ */
UV_PROCESS_SETGROUPS = (1 << 8) UV_PROCESS_SETGROUPS = (1 << 9)
}; };
.. c:type:: uv_stdio_container_t .. c:type:: uv_stdio_container_t
@ -230,8 +230,8 @@ Public members
.. c:member:: uv_uid_t uv_process_options_t.uid .. c:member:: uv_uid_t uv_process_options_t.uid
.. c:member:: uv_gid_t uv_process_options_t.gid .. c:member:: uv_gid_t uv_process_options_t.gid
.. c:member:: uv_process_options_t.gids .. c:member:: uv_gid_t* uv_process_options_t.gids
.. c:member:: uv_process_options_t.gids_size .. c:member:: size_t uv_process_options_t.gids_size
Libuv can change the child process' user/group id and supplementary group Libuv can change the child process' user/group id and supplementary group
ids. This happens only when the appropriate bits are set in the flags fields. ids. This happens only when the appropriate bits are set in the flags fields.

View File

@ -397,8 +397,7 @@ static void uv__process_child_init(const uv_process_options_t* options,
if (options->flags & UV_PROCESS_SETGROUPS) { if (options->flags & UV_PROCESS_SETGROUPS) {
if (setgroups(options->gids_size, options->gids)) { if (setgroups(options->gids_size, options->gids)) {
uv__write_int(error_fd, -errno); uv__write_errno(error_fd);
_exit(127);
} }
} }