src: fix spawnSync CHECK when SIGKILL fails#31768
Closed
bnoordhuis wants to merge 1 commit intonodejs:masterfrom
Closed
src: fix spawnSync CHECK when SIGKILL fails#31768bnoordhuis wants to merge 1 commit intonodejs:masterfrom
bnoordhuis wants to merge 1 commit intonodejs:masterfrom
Conversation
We might not have sufficient privileges to signal the child process
so don't make assumptions about the return value of `uv_process_kill()`.
Example:
node -e 'child_process.spawnSync("sudo", ["ls"], { maxBuffer: 1 })'
No test because:
1. The test needs to run as root (can't invoke sudo), and
2. The parent needs to drop privileges but can't, because
then the child process won't have sufficient privileges.
Fixes: nodejs#31747
santigimeno
approved these changes
Feb 13, 2020
addaleax
approved these changes
Feb 13, 2020
cjihrig
approved these changes
Feb 13, 2020
jasnell
approved these changes
Feb 13, 2020
devnexen
approved these changes
Feb 13, 2020
Collaborator
Collaborator
addaleax
pushed a commit
that referenced
this pull request
Mar 11, 2020
We might not have sufficient privileges to signal the child process
so don't make assumptions about the return value of `uv_process_kill()`.
Example:
node -e 'child_process.spawnSync("sudo", ["ls"], { maxBuffer: 1 })'
No test because:
1. The test needs to run as root (can't invoke sudo), and
2. The parent needs to drop privileges but can't, because
then the child process won't have sufficient privileges.
Fixes: #31747
PR-URL: #31768
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Member
|
Landed in d09e1da |
MylesBorins
pushed a commit
that referenced
this pull request
Mar 11, 2020
We might not have sufficient privileges to signal the child process
so don't make assumptions about the return value of `uv_process_kill()`.
Example:
node -e 'child_process.spawnSync("sudo", ["ls"], { maxBuffer: 1 })'
No test because:
1. The test needs to run as root (can't invoke sudo), and
2. The parent needs to drop privileges but can't, because
then the child process won't have sufficient privileges.
Fixes: #31747
PR-URL: #31768
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Merged
targos
pushed a commit
that referenced
this pull request
Apr 22, 2020
We might not have sufficient privileges to signal the child process
so don't make assumptions about the return value of `uv_process_kill()`.
Example:
node -e 'child_process.spawnSync("sudo", ["ls"], { maxBuffer: 1 })'
No test because:
1. The test needs to run as root (can't invoke sudo), and
2. The parent needs to drop privileges but can't, because
then the child process won't have sufficient privileges.
Fixes: #31747
PR-URL: #31768
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We might not have sufficient privileges to signal the child process
so don't make assumptions about the return value of
uv_process_kill().Example:
No test because:
The test needs to run as root (can't invoke sudo), and
The parent needs to drop privileges but can't, because
then the child process won't have sufficient privileges.
Fixes: #31747