Zlib::GzipWriter#close doesn't really close the underlying stream/file 
descriptor
---------------------------------------------------------------------------------

                 Key: JRUBY-2228
                 URL: http://jira.codehaus.org/browse/JRUBY-2228
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1RC2
         Environment: Latest JRuby 1.1RC2
            Reporter: Vladimir Sizikov
            Assignee: Vladimir Sizikov
             Fix For: JRuby 1.1


Consider the following example:

{noformat}
require 'zlib'

filename="some-file"

10000.times {
  z = Zlib::GzipReader.open(filename)
  z.close
}
{noformat}

Then, during the execution of the script, in other terminal:
lsof | grep some-file

You'll see that number of open 'some-file' files is more than 1, sometimes 5, 
sometimes 20, and varies from time to time.

On windows, where it's impossible to delete an open file, users would either 
get an exeption or, due to JRuby's bug JRUBY-2225, the files are just remain 
undeleted silently.

This is easily visible during the test run on windows, when files like 
"____temp_zlib_file" pollute the workdir after the test run.

Fix is coming.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to