feat: add platform-specific process attributes support#411
feat: add platform-specific process attributes support#411mostlygeek merged 1 commit intomostlygeek:mainfrom
Conversation
WalkthroughThis change introduces platform-specific process attribute configuration for upstream commands in the proxy. Calls to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
proxy/process_windows.go (1)
14-14: Consider using a named constant for improved readability.The magic number
0x08000000representsCREATE_NO_WINDOW. While correct, a named constant would improve code clarity and maintainability.Apply this diff to use a named constant:
+const ( + CREATE_NO_WINDOW = 0x08000000 +) + // setProcAttributes sets platform-specific process attributes func setProcAttributes(cmd *exec.Cmd) { cmd.SysProcAttr = &syscall.SysProcAttr{ HideWindow: true, - CreationFlags: 0x08000000, // CREATE_NO_WINDOW + CreationFlags: CREATE_NO_WINDOW, } }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
proxy/process.go(2 hunks)proxy/process_unix.go(1 hunks)proxy/process_windows.go(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: run-tests
🔇 Additional comments (4)
proxy/process_windows.go (1)
1-16: LGTM! Clean platform-specific implementation.The use of build tags to separate platform-specific code is appropriate, and the combination of
HideWindow: trueandCREATE_NO_WINDOWflag correctly prevents console windows from appearing when spawning child processes on Windows.proxy/process_unix.go (1)
1-12: LGTM! Appropriate no-op implementation.The build tag correctly targets non-Windows platforms, and the no-op implementation is the right approach for Unix systems where console window hiding is not needed.
proxy/process.go (2)
259-259: LGTM! Correct placement of setProcAttributes.The call is appropriately positioned after command configuration and before execution, ensuring process attributes are applied to the main upstream command.
629-629: LGTM! Consistent application to stop command.The call ensures that the stop command receives the same process attributes as the main command, maintaining consistent behavior across all spawned processes.
|
Hi, I’ve never seen this happen before; though I don’t run Windows. What version of Windows are you using? |
|
Interesting. Thanks for the contrib. |
Fixes issues on Windows showing new windows for every process llama-swap spawns.

Add platform-specific process attributes support
Problem
When llama-swap spawns child processes on Windows (such as llama-server instances), console windows appear and remain visible throughout the process lifetime, resulting in a poor user experience. On Windows, .exe processes display console windows by default unless explicitly hidden.
Solution
This PR adds platform-specific process attributes using Go build tags:
Changes
Testing
Tested on Windows 11. Console windows are now completely hidden during model operations.
Thank you for maintaining this project!
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.