generate nonzero exit code when yarn 2 process is killed#8793
Closed
clhuang wants to merge 23 commits intoyarnpkg:1.22-stablefrom
Closed
generate nonzero exit code when yarn 2 process is killed#8793clhuang wants to merge 23 commits intoyarnpkg:1.22-stablefrom
clhuang wants to merge 23 commits intoyarnpkg:1.22-stablefrom
Conversation
* Makes the CLI 2 forwarding stricter * Fixes a test
…yarnpkg#8142) * fix(pack): always ignore yarnrc.yml file * fix(pack): sort files before packing * docs: changelog * chore: ping ci * Update CHANGELOG.md Co-authored-by: Maël Nison <nison.mael@gmail.com>
This improves the experience of working with yarn in workspaces that are marked as "type": "module" in the package.json file. This change has also been applied in yarn 2, see yarnpkg/berry#1354
|
Create a pull request in the new development trunk. |
Author
|
@Harry-Hopkinson Are you saying I should make a PR in https://github.com/yarnpkg/berry? This bug cannot be fixed in the yarn 2 codebase; when yarn 2 is SIGKILLed it is the yarn 1 code that ignores the signal and returns the exit code 0. It is impossible for yarn 2 to handle the SIGKILL. |
|
Ah okay - possibly contact one of the main contributors to the repository due to this development trunk being archived. |
Author
|
@arcanis this fixes yarnpkg/berry#3996 |
3 tasks
Member
|
Fixed in #9009 |
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.
Summary
Yarn 2+, when SIGKILLed (due to OOM for example), fails silently as the yarn 1 process that spawns it does not recognize that it was killed (see yarnpkg/berry#3996), resulting in issues that are difficult to debug as it appears to be successful.
Thus, in spawnp and forkp, use the bash convention of 128+signal to notify the yarn caller that the yarn 2 process was terminated via signal.
Test plan