-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up after JVMs unable to delete temporary shared library files
On Windows, File.deleteOnExit appears to be unable to delete our temporary native library DLL files -- most likely because at the point of deletion the process still has a reference to the loaded DLL, and Windows doesn't allow deleting DLLs that are still referenced by a live process. Work around this limitation by deleting after the fact, i.e., clean up old temp files when we know they should be deleted. Keep marker files in the event that the library file cannot be deleted upon shutdown. Check for these marker files upon starting a new VM using junixsocket, and delete both the marker file and the associated shared library file. The code is written in a way that it should also do the right thing on other platforms, or at least fail silently. #160
- Loading branch information
1 parent
173cc01
commit 0f4fb9e
Showing
1 changed file
with
78 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters