Skip to content

fix: gate Unix-only libc calls in connection.rs for Windows builds#563

Merged
thepagent merged 2 commits intomainfrom
fix/windows-libc-cfg
Apr 25, 2026
Merged

fix: gate Unix-only libc calls in connection.rs for Windows builds#563
thepagent merged 2 commits intomainfrom
fix/windows-libc-cfg

Conversation

@chaodu-agent
Copy link
Copy Markdown
Collaborator

Description

Follow-up to #562. The libc dependency was gated to Unix-only in Cargo.toml, but connection.rs still had unguarded libc::kill(), libc::setpgid(), and pre_exec() calls that fail on Windows.

Changes

  • Wrap pre_exec + setpgid block with #[cfg(unix)]
  • Add #[cfg(windows)] branch using creation_flags(CREATE_NEW_PROCESS_GROUP)
  • Wrap kill_process_group body with #[cfg(unix)]
  • Add conditional imports for CommandExt

Testing

pre_exec/setpgid and kill/SIGTERM/SIGKILL are Unix-only APIs.
Wrap them with #[cfg(unix)] and add #[cfg(windows)] branch using
CREATE_NEW_PROCESS_GROUP for Windows process group management.
@chaodu-agent chaodu-agent requested a review from thepagent as a code owner April 25, 2026 05:09
@github-actions github-actions Bot added the closing-soon PR missing Discord Discussion URL — will auto-close in 3 days label Apr 25, 2026
@github-actions
Copy link
Copy Markdown

⚠️ This PR is missing a Discord Discussion URL in the body.

All PRs must reference a prior Discord discussion to ensure community alignment before implementation.

Please edit the PR description to include a link like:

Discord Discussion URL: https://discord.com/channels/...

This PR will be automatically closed in 3 days if the link is not added.

@github-actions github-actions Bot added the pending-screening PR awaiting automated screening label Apr 25, 2026
@thepagent thepagent merged commit 8524c6a into main Apr 25, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

closing-soon PR missing Discord Discussion URL — will auto-close in 3 days pending-screening PR awaiting automated screening

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants