Skip to content

Fix forwarded process signal encoding#1778

Open
vincent-peng wants to merge 1 commit into
apple:mainfrom
vincent-peng:fix-forwarded-process-signals
Open

Fix forwarded process signal encoding#1778
vincent-peng wants to merge 1 commit into
apple:mainfrom
vincent-peng:fix-forwarded-process-signals

Conversation

@vincent-peng

Copy link
Copy Markdown

Summary

  • Encode forwarded process signals as signal names instead of integer XPC values.
  • Preserve Darwin-to-Linux signal semantics for foreground signal forwarding.
  • Add coverage for the kill request payload and forwarded INT, TERM, WINCH, USR1, and USR2 mappings.

Root cause

Foreground non-tty signal forwarding sent .signal as an integer, but the API server reads that field as a string before forwarding it to the runtime. That made forwarded resize signals fail with missing signal in xpc message. A numeric-only fix would also risk mis-mapping Darwin USR1/USR2 values to Linux.

Fixes #1747

Validation

  • swift test --filter ContainerAPIClientTests.ClientProcessTests
  • swift test --filter ContainerAPIClientTests
  • swift build --target ContainerAPIClient

@vincent-peng vincent-peng marked this pull request as ready for review June 21, 2026 11:18
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