Repository navigation
Windows server: sessions on ConPTY, daemon outside the ssh job - #4
Merged
Merged
Conversation
The daemon is now platform-neutral (daemon.go) behind a small console interface: a PTY on Unix (console_unix.go), a pseudo console on Windows (console_windows.go, CreatePseudoConsole + PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE). The session lock, socket mode and dead-socket check moved with them. Windows sessions run pwsh, else Windows PowerShell, else cmd.exe (HQSH_SHELL overrides, on every OS). The daemon escapes Win32-OpenSSH's per-connection job with CREATE_BREAKAWAY_FROM_JOB, else Win32_Process.Create via WMI, else a plain detached process. Tests: a cmd.exe session on a real ConPTY (start, compute, resize, disconnect and resume, list, exit status 7); CI prints which service manager each OS used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l-fast off macOS CI showed the session falling back to a fork: bootstrap into user/<uid> fails where the user has a GUI login. Try gui/<uid> first, and make the real-manager test report launchctl's error instead of only 'not running'. Windows CI refuses breakaway, so WMI is the path there: test that it starts a process. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Anthony: hqsh must work as a server on every device, Windows included.
daemon.go) behind aconsoleinterface: a PTY on Unix (console_unix.go, the moved code), a pseudo console on Windows (console_windows.go). The session lock, socket mode and dead-socket check moved with them.pwsh, else Windows PowerShell, elsecmd.exe, on a ConPTY.HQSH_SHELLoverrides the shell on every OS.CREATE_BREAKAWAY_FROM_JOB, else via WMIWin32_Process.Create(outside any ssh job), else as a plain detached process.hqsh server setupon Windows: reports the start mode, shell and socket dir.~/.local/bin).Tests
cmd.exesession on a real ConPTY. It starts, computesset /a, resizes, survives a disconnect and resumes without a gap, is listed, and returns exit status 7.helpers_test.go.go vetpasses for linux, darwin and windows.🤖 Generated with Claude Code