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

Tempfile no longer unlinks created files upon garbage collection #1133

Closed
svetlins opened this issue Oct 16, 2013 · 2 comments
Closed

Tempfile no longer unlinks created files upon garbage collection #1133

svetlins opened this issue Oct 16, 2013 · 2 comments
Milestone

Comments

@svetlins
Copy link

@svetlins svetlins commented Oct 16, 2013

Hello,

We are having a problem since upgrading to jruby 1.7.4 in production - files created by Tempfile don't get deleted when the instances of Tempfile are garbage collected, only when the jruby process exits.

I've managed to track down the change of behaviour to the commit 607c6d5 .

There is a test for exactly this behaviour in test/test_tempfile_cleanup.rb which dutifully breaks at exactly this commit (running with jruby test/test_tempfile_cleanup.rb)

We are seeing a problem with this because we are using the paperclip gem which unfortunately creates a lot of Tempfiles without taking care of closing and unlinking them explicitly. I guess there are/will be a lot of people with the same problem as paperclip is a quite popular gem.

@headius headius closed this in 5561fcd Oct 21, 2013
@headius
Copy link
Member

@headius headius commented Oct 21, 2013

Thanks for the report!

@svetlins
Copy link
Author

@svetlins svetlins commented Oct 22, 2013

❤️ ❤️ ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants