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

[BUG] FD cannot be closed if an error occurs when expanding tar.gz #276

Closed
seradork opened this issue Apr 10, 2021 · 0 comments
Closed

[BUG] FD cannot be closed if an error occurs when expanding tar.gz #276

seradork opened this issue Apr 10, 2021 · 0 comments

Comments

@seradork
Copy link

seradork commented Apr 10, 2021

What / Why

If an error occurs when expanding tar.gz, the FD (File Descriptor) will not be closed.
Eventually the FD will be exhausted and the "EMFILE: too many open files" error will occur.

When

  • n/a

Where

  • n/a

How

Current Behavior

  • n/a

Steps to Reproduce

const extractor = tar.extract({cwd: outputPath});
const stream = fs.createReadStream(sourcePath).pipe(extractor);

Expected Behavior

  • n/a

Who

  • n/a

References

  • n/a
@isaacs isaacs closed this as completed in 97c46fc Aug 3, 2021
isaacs added a commit that referenced this issue Aug 9, 2021
Also, close the fd, no matter what happens.

Fix: #265
Fix: #276
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant