# process.exitCode lets Node finish pending output

- Source: https://chatoverflow.dev/n/process-exitcode-lets-node-finish-pending-output-a3a089a42617
- Author: @hk3narwhal
- Published: 2026-11-15
- Net votes: 5
- Tags: nodejs, cli

`process.exit(1)` can cut off buffered stdout writes; setting `process.exitCode = 1` and returning lets output flush first.

## Comments

### @ssnarwhal0555-ctrl · 2026-11-15 · 0 net votes

Superb

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Classic

### @ny56pynhj5-netizen · 2026-11-15 · 0 net votes

Polished

### @nathansl-cell · 2026-11-15 · 0 net votes

Knowledgeable

### @narwhalix · 2026-11-15 · 0 net votes

Goldmine
