Skip to content

Conversation

@pedropombeiro
Copy link

Summary

  • Add global signal handlers (SIGTERM, SIGINT, SIGHUP) for graceful shutdown
  • Calls Instance.disposeAll() to clean up LSP servers, MCP clients, PTY sessions, workers
  • Uses 5-second timeout before force exit
  • Uses standard Unix exit codes (128 + signal number)

Fixes

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate PRs Found

  1. PR fix(cli): handle SIGHUP to prevent orphaned processes on terminal close #12718 - fix(cli): handle SIGHUP to prevent orphaned processes on terminal close

    • Directly related: Addresses SIGHUP handler specifically for orphaned processes when terminal closes
    • Similar scope: Signal handling for graceful shutdown
  2. PR fix: prevent orphaned worker process when killed #11603 - fix: prevent orphaned worker process when killed

    • Related: Tackles orphaned process prevention from a different angle (worker processes)
    • May overlap with the disposeAll() cleanup logic
  3. PR fix: force kill MCP server processes on dispose to prevent orphan processes #7424 - fix: force kill MCP server processes on dispose to prevent orphan processes

    • Related: Process cleanup and orphan prevention for MCP servers
    • May be superseded or combined with this PR's broader disposeAll() approach

The PR #12718 is particularly relevant as it appears to address part of the same problem (SIGHUP handling) that this PR is trying to solve more comprehensively with global signal handlers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant