Skip to content

Explore preventing add-ons from exiting the process #3315

Open
@vinistock

Description

@vinistock

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood-first-issueGood for newcomershelp-wantedExtra attention is neededpinnedThis issue or pull request is pinned and won't be marked as staleserverThis pull request should be included in the server gem's release notes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions