tearDown() is not executed if the executon is terminated via Control-C
----------------------------------------------------------------------
Key: JRUBY-4637
URL: http://jira.codehaus.org/browse/JRUBY-4637
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.4
Reporter: Vladimir Sizikov
Not executing Ruby.tearDown() leads to some undesirable effets: at_exit blocks
are not executed, various registered finalizers are not executed as well.
Here's an example:
{code}
jruby -e "at_exit {p 'AT_EXI'}; puts 'Press Control-C'; sleep(10)"
{code}
JRuby prints "Press Control-C", and when it's pressed, AT_EXIT is *not*
printed. at_exit blocks are just not executed at all.
For MRI, AT_EXIT is printed as expected.
Maybe, the solution for this could be to register a signal handler for
Control-C and then execute tearDown().
--
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