This bug has been filed to add the missing functionality for deleteOnExit
function in java.io.File class.
Whenever a temporary file is created by an application using "createTempFile" function of java.io.File, deleteOnExit function registers with the VM that it should be deleted when the VM exits.
However, this is valid only for normal termination of the VM. If a signal
terminates the VM, like Ctrl-C, the temporary file does not get deleted and hence the temporary files start getting adding up.
This behavior has been observed in Windows.
The attached test file, "tempfiletest.java" can be run in any Windows NT machine
after changing the third argument of line 10. This is to specify the directory
on the local machine where the temporary file needs to be generated.
After compiling and running the test program, it is observed that the temporary
file is generated while the for loop is running. However, if the VM terminates
normally, the temporary file gets deleted on it's own. If Ctrl-C is done while
the for loop is on, the temporary file remains behind.