Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.0.0, JRuby 1.1b1
-
Fix Version/s: JRuby 1.0.2, JRuby 1.1b1
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Linux
-
Number of attachments :
Description
I'm trying to solve problem why classic debugger in debug-commons does not exit under Windows. It is caused by the fact that 'Kernel.exit!' does not exit the underlaying process. As trying to reproduce with simple test-case I've got to the following one under Linux which might be related to the Windows problem. Not sure, the one under Windows might be different.
Following code exit under C Ruby but not under JRuby (running Linux). It might cause by the 'next' call somehow
.
terminator = Thread.new do sleep 2 puts 'exit' exit! end Kernel.module_eval(<<-"end;" alias_method(:debug_commons_set_trace_func, :set_trace_func) def set_trace_func(proc) raise "Cannot call 'set_trace_func' method during debugging session." end end; ) debug_commons_set_trace_func(lambda do |_, _, _, _, _, _| next if Thread.current == terminator loop do puts Thread.current.object_id sleep 1 end end) p "whatever...."
Aliasing is not needed actually in the code snipped. This issue is particularly critical for GUI debugger, since they are not able to kill debugging session. But I would bet that this is regression in debug-commons - it worked in the past. But not so sure now. Anyway evaluating this issue quickly would really help me