-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generate nonzero exit code when yarn 2 process is killed #8793
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 <[email protected]>
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. |
@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. |
@arcanis this fixes yarnpkg/berry#3996 |
Fixed in #9009 |
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