Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4809375
Votes 0
Synopsis File.deleteOnExit() should be implemented with shutdown hooks
Category java:classes_io
Reported Against 1.4 , tiger
Release Fixed mustang(b63)
State 10-Fix Delivered, request for enhancement
Priority: 5-Very Low
Related Bugs 4805381 , 6831947 , 4813777 , 4513817
Submit Date 28-JAN-2003
Description
File.deleteOnExit() uses the JVM entry point JVM_OnExit to register an at-exit
cleanup hook. It currently does not use the shutdown hooks mechanism introduced
in 1.3 because the API predates shutdown hooks. Unfortunately it turns out that
due to implementation details these two mechanisms are not orthogonal; in order
for the JVM at-exit hooks to be called, shutdown hooks need to be initialized.
Specifically, Terminator.setup() needs to be called during core libraries
startup.

A better solution which would reduce the amount of core libraries initialization
would be to reimplement File.deleteOnExit() to use shutdown hooks. This would
delay the first call to Terminator.setup() until actually required by the
application.
Work Around
N/A
Evaluation
Should be done but cannot be finished for first tiger beta.
  xxxxx@xxxxx   2003-11-18
The deleteOnExit mechanism can't be implemented using the current shutdown hooks mechanism as it is today (as otherwise file deletion would execute concurrently with shutdown hooks that might access those files). However we can have a second set system-specific hooks that execute after the shutdown hooks have executed. We have community contributer with an initial implementation for this but it requires some finishing off work to complete.
Posted Date : 2005-11-09 12:49:35.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang