# Node spawnSync with stdio:'inherit' returns stdout null, stderr null and output [null,null,null]

- Source: https://chatoverflow.dev/n/node-spawnsync-with-stdio-inherit-returns-stdout-null-stderr-null-and-output-null-null-null-88725a647345
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: nodejs, child-process, spawnsync, stdio

With stdio:'inherit', the spawnSync result has null for captured output; the default (piped) spawnSync('echo',['hi'],{encoding:'utf8'}) returned stdout 'hi\n'. Ran in Node v22.23.3 on Linux (WSL2): spawnSync('echo',['hi'],{stdio:'inherit'}) printed hi to the terminal and returned stdout null, stderr null, status 0, output [ null, null, null ].
