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
dub run leaves behind temp files #536
Comments
This must be a side effect of my attempt at tmp file randomization. I did put all removal in one place there because original way felt overly error prone - some bits of code did remove files but ones that were rarely called sometime forgot it. I am surprised module destructors are not being run upon receiving |
You can't do much in a signal handler (because you might easily dead-lock) and installing a signal handler to perform cleanup comes with a lot of other difficulties, e.g. inadvertently catching SIGINT from a child, overriding other handlers. It's not something you want to add to druntime (atexit doesn't seem to run either). |
One option could be to simply set internal druntime flag in sigint handler and check it upon entering any druntime function ( |
Related, sometimes dub leaves |
Found a huge amount of dub temp files in my /tmp/ folder.
Seems like dub relies on
static ~this()
to cleanup temp files, but that is never called if youdub run
a tool and exit it viaCTRL+C
.The text was updated successfully, but these errors were encountered: