Can't trap "special signal" 'EXIT' or '0'
-----------------------------------------

                 Key: JRUBY-4705
                 URL: http://jira.codehaus.org/browse/JRUBY-4705
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.4
         Environment: Windows 7
            Reporter: Matt Baker


I can't seem to trap("EXIT") in JRuby.

The following works in Ruby:
trap("EXIT") {
        puts "EXIT caught"
}

puts "Start"
sleep(5)
puts "End"

Under Ruby the block will run if you ctrl-c the program, or if you simply let 
it run and terminate normally. Under JRuby this doesn't seem to work, although 
I can trap the ctrl-c by trapping SIGINT.

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