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

fix leaking object.cache file references (fixes #462) #483

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

sni
Copy link
Contributor

@sni sni commented Nov 10, 2024

using fopen opens the object.cache a second time and naemon closes just one afterwards. So with every write of the objects.cache file, one reference will be kept and prevents the file from beeing deleted which finally fills the disk with deleted files. Using fdopen solves the issue, since it just reuses the existing fd.

using fopen opens the object.cache a second time and naemon closes just one afterwards.
So with every write of the objects.cache file, one reference will be kept and prevents
the file from beeing deleted which finally fills the disk with deleted files.
Using fdopen solves the issue, since it just reuses the existing fd.
Copy link
Member

@nook24 nook24 left a comment

Choose a reason for hiding this comment

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

Looks good to me. We also use the same method for the status.dat and retention.dat

@sni sni merged commit b9a6af3 into naemon:master Nov 13, 2024
33 checks passed
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

Successfully merging this pull request may close these issues.

2 participants