Fix /dev/tty open on Windows in _start_stdout_capture! #40
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
kahliburke/Kaimon.jl!40
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/windows-dev-tty"
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?
Summary
On Windows, running
kaimoncrashes at startup with:/dev/ttyis Unix-only. On Windows the equivalent controlling-terminal device isCON. This PR usesSys.iswindows()to pick the right path.Why this matters
_TUI_REAL_STDOUTholds a handle to the real terminal that survivesredirect_stdout(), and that handle is later assigned toTachikoma.Terminal.io(src/tui/lifecycle.jl:213) so the TUI can render even whilestdoutis being captured into the Server log buffer. Without a working terminal handle on Windows, the TUI can't start at all.Test plan
open("CON", "w")returns a writable console handle on Windows 11 / Julia 1.12.5.kaimonproceeds past_start_stdout_capture!and into TUI init (a separate, unrelatedZMQ: Protocol not supportederror fromipc://sockets ingate_client.jlis the next Windows blocker — out of scope for this PR; happy to file an issue)./dev/tty).Note on broader Windows support
This is a one-line compatibility fix and does not claim to make Kaimon fully Windows-ready. The ZMQ IPC transport (
ipc://) is also unavailable on Windows in the standardZMQ_jllbuild, which would need a separate fix (e.g. switching totcp://127.0.0.1:<port>or a Windows-named-pipe transport). Filing that as a separate issue.Thanks @mind6 — this fix has landed on
2.0-integration:_start_stdout_capture!now opensCONon Windows instead of/dev/tty(seesrc/tui/io.jl, credited to this PR). Closing as incorporated. Remaining Windows work (the ZMQipc://→TCP switch) is tracked/done in #41.Pull request closed