Skip to content

fix(node): fill child_process spawnSync result fields#1950

Merged
proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-child-process-spawnsync-result
May 27, 2026
Merged

fix(node): fill child_process spawnSync result fields#1950
proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-child-process-spawnsync-result

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

@andrewtdiz andrewtdiz commented May 27, 2026

Summary

  • Fixes node:child_process — spawnSync result missing pid/signal/output/error fields #1936 by returning Node-shaped child_process.spawnSync result fields.
  • Adds status, signal, output, pid, stdout, and stderr for completed children, including non-zero exits.
  • Adds a command-not-found result shape with error.code === "ENOENT", status: null, signal: null, output: null, numeric pid, and undefined stdio fields.
  • Adds a focused node-suite/child_process/sync/spawn-sync-result-fields parity fixture.

Reference

  • Consulted locally, not committed: reference/deepwiki/deno-node-child-process-spawnsync-result-fields-2026-05-27.md.

Verification

  • Baseline before fix: PERRY_NO_CACHE=1 ./run_parity_tests.sh --suite node-suite --module child_process --filter spawn-sync-result-fields failed because Perry printed keys: stdout,stderr,status where Node printed keys: status,signal,output,pid,stdout,stderr.
  • PERRY_NO_CACHE=1 ./run_parity_tests.sh --suite node-suite --module child_process --filter spawn-sync-result-fields PASS.
  • PERRY_NO_CACHE=1 ./run_parity_tests.sh --suite node-suite --module child_process PASS 2/2 after rebasing onto merged fix(node): throw for child_process sync failures #1949.
  • PERRY_NO_CACHE=1 ./run_parity_tests.sh --filter test_parity_child_process PASS.
  • cargo test -p perry-runtime child_process --lib PASS with pre-existing warnings.
  • cargo fmt --all -- --check PASS.
  • jq empty test-parity/known_failures.json PASS.
  • git diff --check PASS.

Non-goals

@andrewtdiz andrewtdiz force-pushed the codex/node-compat-child-process-spawnsync-result branch from 5dae181 to dc7d932 Compare May 27, 2026 10:31
@proggeramlug proggeramlug merged commit 557a902 into PerryTS:main May 27, 2026
10 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.

node:child_process — spawnSync result missing pid/signal/output/error fields

2 participants