-
Notifications
You must be signed in to change notification settings - Fork 16
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 is being unlinked in the middle of a program even if I set :!unlink #18
Comments
So it turns out I was disabling unlinking on the wrong tempfile. Correcting that fixes my program, but the documentation for tempfile is incorrect when it says "Automatically unlink files at end of program (this is the default)". According to https://docs.perl6.org/type/Metamodel$COLON$COLONFinalization#index-entry-DESTROY, "[...] DESTROY submethods are called (if they exist) when an object is garbage-collected." |
This is actually a serious issue. |
I didn't make it clear in my previous comment. Depending on DESTROY is problematic because there is no requirement for DESTROY to be called during program exit. https://irclog.perlgeek.de/perl6/2016-09-26#i_13285049 https://irclog.perlgeek.de/perl6/2016-03-15#i_12190212 |
The Perl 6 version of bisectable writes the code to bisect into a temp file created with File::Temp. However, sometimes during the bisection the temp file gets unlinked (even if I set :!unlink). I've straced the bot and I can see it reading the file for each step of the bisection, and then randomly right in the middle is an unlink, so of course the next bisect steps freak out because the file they've been told to run doesn't exist.
The text was updated successfully, but these errors were encountered: