mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #601] [CLOSED] Windows: the engine waits for QUIT on Ctrl+C and Ctrl+Break, so a stop keeps its conversation #621
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#621
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mw00/project-maya/pull/601
Author: @pschaub
Created: 10/28/2026
Status: ❌ Closed
Base:
main← Head:windows-ctrl-break📝 Commits (1)
115b330Windows: the engine waits for QUIT on Ctrl+C and Ctrl+Break, so a stop keeps its conversation📊 Changes
2 files changed (+12 additions, -0 deletions)
View changed files
📝
src/ds4/ds4_main.cpp(+5 -0)📝
src/program/generate.cpp(+7 -0)📄 Description
Fixes #576.
On Windows the engine now ignores Ctrl+C and Ctrl+Break in serve mode, as it already ignores SIGINT and SIGTERM on Linux. The server still stops on them and ends the engine with QUIT, so with
MAYA_GLM_SLOT_KEEP=1the engine writes the conversation in the model before it ends. The problem and the measurements are in #576. No new setting.What changes:
src/program/generate.cpp: the POSIX block at the start ofglm_pack_generategets an#else. In serve mode the engine ignoresSIGINTandSIGBREAK, which the C runtime on Windows raises for the console's Ctrl+C and Ctrl+Break.src/ds4/ds4_main.cpp: the same inserve, and as on Linux only while it keeps conversations.What stays as it is: The server handles the stop as before. The first Ctrl+C or Ctrl+Break stops it and it ends the engine with QUIT, and an engine that has not ended after
MAYA_ENGINE_QUIT_Sis killed. If the server ends without QUIT (a second Ctrl+C), the engine still ends when its input closes. Linux builds are unchanged, the new code is in the_WIN32branch only.Before and after: In #576 (v1.1.27, 2 runs each), after a Ctrl+Break stop and a restart the conversation that was in the model was read again from token 0 without the fix (7.8 s) and reused with it (6,164 of 6,206 tokens, 2.0 s). On this branch (v1.1.35, one run each): without the fix 0 of 6,206 reused, 14.2 s; with it 6,164 of 6,206, 3.4 s. All reads were slower in this run than in #576, in both builds alike (the first read of the prompt took 14 to 16 s).
Output: Unchanged, only the stop is touched.
Tests:
tools/check_hip_compat.py: OK, on main and with this PR.test_ds4_engram_ram, which needs a process without CAP_IPC_LOCK.mayaandmaya-ds4(MSVC 19.44, CUDA 13.4), and the Ctrl+Break runs above withmayaon an RTX 5090.maya-ds4runs (it builds), the Windows AMD build.My setup: Maya v1.1.35 built from source, MSVC 19.44, CUDA 13.4, RTX 5090 32 GB, 64 GB DDR5, Ryzen 9 9950X3D2, Windows 11, Maya-S-v2 IQ2_XXS
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.