Skip to content
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

src: ignore SIGXFSZ, don't terminate (ulimit -f) #27798

Merged
merged 1 commit into from
May 23, 2019

Conversation

bnoordhuis
Copy link
Member

Ignore SIGXFSZ signals so that exceeding RLIMIT_FSIZE makes the
offending system call fail with EFBIG instead of terminating the
process.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label May 21, 2019
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@richardlau richardlau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM apart from a variable name in the test.

const cmd = `ulimit -f 1 && '${process.execPath}' '${__filename}' child`;
const result = child_process.spawnSync('/bin/sh', ['-c', cmd]);
assert.strictEqual(result.stdout.toString(), '');
const shibboleth = 'Error: EFBIG: file too large, write';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename this variable to something boring like error or errormsg.

@bnoordhuis
Copy link
Member Author

Added more bore. New CI: https://ci.nodejs.org/job/node-test-pull-request/23257/

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@bnoordhuis
Copy link
Member Author

One more test fix-up for shared library mode: https://ci.nodejs.org/job/node-test-pull-request/23258/

@nodejs-github-bot
Copy link
Collaborator

Ignore SIGXFSZ signals so that exceeding RLIMIT_FSIZE makes the
offending system call fail with EFBIG instead of terminating the
process.

PR-URL: nodejs#27798
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@bnoordhuis bnoordhuis closed this May 23, 2019
@bnoordhuis bnoordhuis deleted the ignore-sigxfsz branch May 23, 2019 09:30
@bnoordhuis
Copy link
Member Author

Thanks, landed in 58fe440.

@bnoordhuis bnoordhuis merged commit 58fe440 into nodejs:master May 23, 2019
targos pushed a commit that referenced this pull request May 23, 2019
Ignore SIGXFSZ signals so that exceeding RLIMIT_FSIZE makes the
offending system call fail with EFBIG instead of terminating the
process.

PR-URL: #27798
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@targos targos mentioned this pull request Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants