Open
Description
Currently, if an add-on executes exit
, the Ruby LSP process will die and cause the editor connection to crash.
I've been wondering if we can prevent that from happening. My idea would be to capture the original exit
method in a constant (so that we can ourselves use it when shutting down) and then override it to no-op.
Something like this:
ORIGINAL_EXIT = Kernel.method(:exit)
module Kernel
def exit
# do nothing
end
end
# when shutting down
ORIGINAL_EXIT.call