Skip to content

Terminate Windows non-TTY processes on interrupt - #35655

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/34504d01f091ef57bb961e98ad5a8d9f1acee4ee
Jul 27, 2026
Merged

Terminate Windows non-TTY processes on interrupt#35655
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/34504d01f091ef57bb961e98ad5a8d9f1acee4ee

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 27, 2026

Copy link
Copy Markdown

Terminate Windows non-TTY processes on interrupt

Why

Windows non-TTY exec sessions reported interrupts as unsupported, so sending
Ctrl-C through write_stdin did not stop the running process.

What changed

  • Route interrupt requests for Windows non-TTY processes through their existing
    termination callback, including pipe-backed processes.
  • Track whether driver-backed Windows sessions use a TTY so PTY interrupts keep
    their existing behavior.
  • Consume the terminator after a successful interrupt to avoid invoking it again
    when the process handle is dropped.

Testing

Added coverage for local and remote exec-server sessions, unified exec, pipe
fallbacks, and legacy Windows sandbox processes.

## Why

Windows non-TTY exec sessions reported interrupts as unsupported, so sending
Ctrl-C through `write_stdin` did not stop the running process.

## What changed

- Route interrupt requests for Windows non-TTY processes through their existing
  termination callback, including pipe-backed processes.
- Track whether driver-backed Windows sessions use a TTY so PTY interrupts keep
  their existing behavior.
- Consume the terminator after a successful interrupt to avoid invoking it again
  when the process handle is dropped.

## Testing

Added coverage for local and remote exec-server sessions, unified exec, pipe
fallbacks, and legacy Windows sandbox processes.

GitOrigin-RevId: 34504d01f091ef57bb961e98ad5a8d9f1acee4ee
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/34504d01f091ef57bb961e98ad5a8d9f1acee4ee branch from fdfaa25 to 6b23635 Compare July 27, 2026 18:37
@copyberry
copyberry Bot merged commit 6b23635 into main Jul 27, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/34504d01f091ef57bb961e98ad5a8d9f1acee4ee branch July 27, 2026 18:38
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant