Skip to content

Feat/daemon shutdown 2#1950

Open
SMGoro wants to merge 5 commits intoMCSManager:masterfrom
SMGoro:feat/daemon-shutdown-2
Open

Feat/daemon shutdown 2#1950
SMGoro wants to merge 5 commits intoMCSManager:masterfrom
SMGoro:feat/daemon-shutdown-2

Conversation

@SMGoro
Copy link

@SMGoro SMGoro commented Jan 13, 2026

This pull request introduces improvements to the shutdown logic of the daemon, allowing for a "soft exit" mode that gracefully shuts down non-Docker instances while skipping Docker instances. This enhances the shutdown process by providing a safer, less disruptive way to stop services unless a forceful shutdown is required. Additionally, there are minor code style and import order adjustments.

Shutdown logic improvements:

  • Added a new softExit method to InstanceSubsystem that skips Docker instances and attempts a soft shutdown of general instances. If instances take too long to stop, they are forcefully closed after a timeout.
  • Updated the shutdown signal handlers in app.ts to use the new soft exit logic by default when receiving process signals or the "exit" command, only performing a forceful exit if necessary. [1] [2]

Minor code improvements:

  • Fixed a missing semicolon and improved import order in app.ts for consistency. [1] [2]

已知问题:在某些 Linux 环境下,直接在前台按 Ctrl+C 无法正常触发对非 Docker 实例的软关闭(可能与终端、systemd 或容器化运行时的信号传播有关,systemd更改KillMode=process可正常运关闭)。

Copilot AI review requested due to automatic review settings January 13, 2026 00:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant