Skip to content

Fix foreground process signal forwarding#1871

Open
Jalendar10 wants to merge 1 commit into
apple:mainfrom
Jalendar10:codex/fix-process-signal-forwarding
Open

Fix foreground process signal forwarding#1871
Jalendar10 wants to merge 1 commit into
apple:mainfrom
Jalendar10:codex/fix-process-signal-forwarding

Conversation

@Jalendar10

Copy link
Copy Markdown

Summary

Fix foreground process signal forwarding so signals sent from the CLI are encoded in the format expected by the container API service.

Root cause

ClientProcess.kill(_:) was writing the XPC signal field as an integer, but the container service reads that field as a string. During foreground process handling this could surface as missing signal in xpc message. SIGWINCH was also included in the generic signal-forwarding set even though TTY sessions already use the dedicated resize route, which made terminal resize events especially noisy.

Changes

  • Send forwarded process signals as canonical names such as SIGINT and SIGTERM.
  • Remove SIGWINCH from the generic kill-signal forwarding set so resize events stay on the terminal resize path.
  • Add ContainerAPIClientTests coverage for signal-name encoding and resize-signal exclusion.

Fixes #1747.

Validation

  • swift test --filter ProcessIOTests
  • swift test --filter ContainerAPIClientTests

@Jalendar10 Jalendar10 changed the title [codex] Fix foreground process signal forwarding Fix foreground process signal forwarding Jun 30, 2026
@Jalendar10 Jalendar10 marked this pull request as ready for review June 30, 2026 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Terminal resize SIGWINCH forwarding prints missing signal in xpc message

1 participant