This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: System.gc() to close file descriptors (was RE: status of gcj's bo ehm collector?)


>>>>> "Hans" == Boehm, Hans <hans_boehm@hp.com> writes:

Hans> I looked at the gcj code a little more closely.
Hans> System.runFinalization() also seems to have two other problems:

I think we should get in the habit of reporting all these sorts of
things to Gnats; we've dropped too many issues like this in the past.

Andrew, are you still looking at this?

Hans> 1. BufferedOutputStreams and the like are not flushed if the
Hans> file descriptor is dropped and finalized (or if it persists
Hans> until process exit).

The spec doesn't address this.

One idea would be to reverse-engineer Sun's implementation.
I don't think client code can rely on anything here though.

Hans> 2. There seems to be a minor problem with finalization of
Hans> FileDescriptors.  They are closed only if they are still open,
Hans> but the test and the close are done without synchronization.

Thanks.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]