Skip to content

[codex] honor child_process timeout killSignal - #4262

Merged
proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-child-process-timeout-killsignal
Jun 4, 2026
Merged

proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-child-process-timeout-killsignal

Conversation

@andrewtdiz

@andrewtdiz andrewtdiz commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • honor options.killSignal when timeout kills buffered exec() / execFile() and sync spawnSync() / execSync() / execFileSync() children
  • add live spawn() / fork() timeout termination through the child-process reactor so exit / close, killed, and signalCode reflect the configured signal
  • share child_process signal parsing/name reporting across ChildProcess#kill() and timeout paths
  • add focused Node parity coverage for sync, buffered async, live spawn, and fork timeout termination with SIGKILL

Scope

Refs #2555 and #2130. This is the deterministic timeout/killSignal child_process option slice only.

Non-goals

AbortSignal lifecycle semantics, numeric fd sharing, custom stream handles, uid/gid, detached/platform flags, and broad child_process option validation remain follow-up work.

Validation

  • npm exec --yes --package=node@26 -- node --experimental-strip-types test-parity/node-suite/child_process/async/timeout-killsignal.ts
  • CARGO_TARGET_DIR=/tmp/perry-child-timeout-check cargo check -p perry-runtime
  • PERRY_NO_AUTO_OPTIMIZE=1 CARGO_TARGET_DIR=/tmp/perry-node-child-process-timeout-killsignal npm exec --yes --package=node@26 -- bash -lc './run_parity_tests.sh --suite node-suite --module child_process --filter timeout-killsignal & pid=$!; while kill -0 "$pid" 2>/dev/null; do echo "[heartbeat] child_process timeout parity still running"; sleep 20; done; wait "$pid"'
    • report: /root/perry-worktrees/perry-node-child-process-timeout-killsignal/test-parity/reports/parity_report_20260603_142824.json
  • PERRY_NO_AUTO_OPTIMIZE=1 CARGO_TARGET_DIR=/tmp/perry-node-child-process-timeout-killsignal npm exec --yes --package=node@26 -- bash -lc './run_parity_tests.sh --suite node-suite --module child_process & pid=$!; while kill -0 "$pid" 2>/dev/null; do echo "[heartbeat] child_process full parity still running"; sleep 20; done; wait "$pid"'
    • report: /root/perry-worktrees/perry-node-child-process-timeout-killsignal/test-parity/reports/parity_report_20260603_142901.json
  • cargo fmt --all -- --check
  • git diff --check
  • ./scripts/check_file_size.sh

@proggeramlug
proggeramlug marked this pull request as ready for review June 4, 2026 09:58
@proggeramlug
proggeramlug merged commit ccd0729 into PerryTS:main Jun 4, 2026
11 checks passed
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.

2 participants