-
Notifications
You must be signed in to change notification settings - Fork 435
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
Hardcoded /tmp files are created #281
Comments
nh2
added a commit
to nh2/PoissonRecon
that referenced
this issue
Nov 2, 2023
With the switch away from `std::tmpdir()` we lose the auto-deletion functionality of the temp files. There's no cross-platform alternative that allows to specify the temporary dir: https://stackoverflow.com/questions/5586355/c-getting-a-temporary-file-cross-platform The previous approach also had the drawback that the temp files were kept open, and were not truncated, throughout all phases, thus potentially using disk space for longer than necessary. This commit deletes the temporary files before each new use (though truncating would be sufficient).
I made improvements to this in my branch master...nh2:PoissonRecon:nh2fixes-v15.03 |
nh2
added a commit
to nh2/PoissonRecon
that referenced
this issue
Nov 2, 2023
With the switch away from `std::tmpdir()` we lose the auto-deletion functionality of the temp files. There's no cross-platform alternative that allows to specify the temporary dir: https://stackoverflow.com/questions/5586355/c-getting-a-temporary-file-cross-platform The previous approach also had the drawback that the temp files were kept open, and were not truncated, throughout all phases, thus potentially using disk space for longer than necessary. This commit deletes the temporary files before each new use (though truncating would be sufficient).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
PoissonRecon/Src/PoissonRecon.client.inl
Line 163 in d4e8715
std::tmpfile
is used.This writes large files to
/tmp
unoverridably (apparenltystd::tmpfile()
ignores theTMPDIR
environment variable, unlikestd::filesystem_temp_directory_path
.This can lead to out-of-disk conditions, such as #280.
It is also confusing, especially for programs where
--tempDir
is given, that then another temp directory is additionally used.Finally, these
cacheFiles
are neverclose()
d so they leak file descriptors all the way to the end of the process.The text was updated successfully, but these errors were encountered: