MRI inconsistency: JRuby doesn't appear to run 'ensure' code when it receives a 
kill signal. 
---------------------------------------------------------------------------------------------

                 Key: JRUBY-4610
                 URL: http://jira.codehaus.org/browse/JRUBY-4610
             Project: JRuby
          Issue Type: Bug
          Components: Interpreter
    Affects Versions: JRuby 1.4
         Environment: CentOS, OS X 10.5, OS X 10.6
            Reporter: Abhi Hiremagalur
         Attachments: kill_ensure.rb, test_kill_ensure.rb

JRuby doesn't appear to run 'ensure' code when it receives a kill signal. MRI 
1.8.7 on the other hand always runs 'ensure' blocks when it receives a 'kill 
-HUP' or 'kill -INT'

This means any resources that are cleaned up gracefully via an ensure block 
don't get cleaned up when the JRuby process is terminated with a 'kill -HUP' or 
'kill -QUIT'

We've attached tests for this issue, the MRI test passes but the JRUBY test 
fails. MRI (ruby) and JRuby (jruby) need to be on the PATH for this test to run.

$ ruby test_kill_ensure.rb -v
Loaded suite test_kill_ensure
Started
test_kill_ensure_with_jruby(TestKillEnsure): F
test_kill_ensure_with_ruby(TestKillEnsure): .

Finished in 2.930825 seconds.

  1) Failure:
test_kill_ensure_with_jruby(TestKillEnsure) [test_kill_ensure.rb:12]:
<false> is not true.

2 tests, 2 assertions, 1 failures, 0 errors

-- 
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