Repository navigation
Port ndx's process stopping for parity - #59
Merged
Merged
Conversation
Follow ndx's ProcessStop/ChildProcess, adapted to stopping a process we did not start: - Record the processes the target started before signaling it and while waiting, since they are reparented once it exits, and wait for them within the same timeout. - Add -k|--kill to kill what is still running when the timeout expires, with its process tree. - On Windows, send WM_CLOSE first and Ctrl+C through stopr second. A GUI app started from a shell has no console, and stopr attached to the shell's console instead and reported success. Console windows are never sent WM_CLOSE, which would close the console instead of Ctrl+C. - Close NeoAstra apps through their unowned top-level NeoAstra.Window frames only. - On Unix, send SIGINT with libc kill(): procps-ng kill took "-INT -<pgid>" without signaling and exited with 0. Signal only the target when its process group is our own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: CodeAlta <noreply@codealta.io>
kzu
enabled auto-merge (rebase)
November 19, 2026 03:37
The /proc checks ended the wait at once on macOS, which has no /proc, so stop returned while the target was still shutting down and --timeout and --kill never applied. They now run on Linux only; macOS waits for Process.HasExited. The process group comes from libc getpgid() on every Unix, so macOS also sends SIGINT to the group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: CodeAlta <noreply@codealta.io>
With RuntimeIdentifiers=any and PublishAot=true, the .NET 11 SDK drops 'any' from the RID-specific tool packages (AOT packs only RIDs the host compiles natively) and, with none left, re-packs the project with an empty RuntimeIdentifier: MSB4006, circular dependency on _CreateRIDSpecificToolPackages. Turn AOT off when building only for 'any', and build -r any (after a restore) before the solution, since packing the solution now packs stop.any from that build's output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: CodeAlta <noreply@codealta.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the process stopping logic of ndx (
ProcessStop/ChildProcess) for parity, adapted to stopping a process we did not start.--timeout.-k|--kill: kills whatever is still running when the timeout expires, with its process tree. Opt-in: ndx always kills because it must restart the tool.WM_CLOSEfirst, then Ctrl+C throughstopr, as in ndx. This fixes GUI apps started from a shell:stoprattached to the shell's console and reported success, so the window never closed. Console windows (ConsoleWindowClass,PseudoConsoleWindow) are never sentWM_CLOSE, which would close the console instead of sending Ctrl+C.NeoAstra.Windowframes getWM_CLOSE.kill(). procps-ngkill -INT -<pgid>exited 0 without signaling anything. Only the target is signaled when its process group is our own (e.g.app & dnx stop $!in a script).Smoke-tested on Windows (console, hidden/visible console, GUI, NeoAstra layout, process tree, timeout,
--kill, piped PIDs) and on Linux under WSL (SIGINT, process tree, timeout,--kill, same-group guard). Not tested on macOS or with a Native AOT Linux build.🤖 Generated with Claude Code
This pull request was created by CodeAlta.