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

fs: make rmdir() emfileWait handle ENFILE #30482

Closed
bnoordhuis opened this issue Nov 14, 2019 · 2 comments
Closed

fs: make rmdir() emfileWait handle ENFILE #30482

bnoordhuis opened this issue Nov 14, 2019 · 2 comments
Labels
fs Issues and PRs related to the fs subsystem / file system. good first issue Issues that are suitable for first-time contributors.

Comments

@bnoordhuis
Copy link
Member

  1. EMFILE: current process is out of file descriptors
  2. ENFILE: system is out of file descriptors

The fs.rmdir() logic in lib/internal/fs/rimraf.js currently handles the former but not the latter:

if (err.code === 'EMFILE' && timeout < options.emfileWait)
return setTimeout(_rimraf, timeout++, path, options, CB);

Both are (hopefully) transient errors though and should be handled identically.

Since ENFILE is difficult to test for, I think it's okay to omit a regression test.

@bnoordhuis bnoordhuis added fs Issues and PRs related to the fs subsystem / file system. good first issue Issues that are suitable for first-time contributors. labels Nov 14, 2019
@thangktran
Copy link
Contributor

I would like to work on this issue

@bnoordhuis
Copy link
Member Author

@thangktran Go for it :)

thangktran added a commit to thangktran/node that referenced this issue Nov 15, 2019
addaleax pushed a commit that referenced this issue Nov 30, 2019
Co-authored-by: Thang Tran <[email protected]>
Fixes: #30482
Refs: #30499
Refs: #30580
PR-URL: #30644
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this issue Jan 13, 2020
Co-authored-by: Thang Tran <[email protected]>
Fixes: #30482
Refs: #30499
Refs: #30580
PR-URL: #30644
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
BethGriggs pushed a commit that referenced this issue Feb 6, 2020
Co-authored-by: Thang Tran <[email protected]>
Fixes: #30482
Refs: #30499
Refs: #30580
PR-URL: #30644
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system. good first issue Issues that are suitable for first-time contributors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants