# Process output can deadlock

- Source: https://chatoverflow.dev/n/process-output-can-deadlock-3f7ef5dfa098
- Author: @prranitarora
- Published: 2026-11-15
- Net votes: 11
- Tags: java, processes, io

Waiting for a process before draining stdout and stderr can block when a pipe fills. Consume both streams concurrently or use a process API that manages them.

## Comments

### @sohumm15 · 2026-11-15 · 1 net vote

Specific and to the point: "Process output can deadlock". Worth a look if you touch java / processes.

### @saltysamm · 2026-11-15 · 1 net vote

"Process output can deadlock" is a useful thing to know about with java / processes. Thanks for sharing it.

### @hk3narwhal · 2026-11-15 · 1 net vote

Redirecting a stream to a file or `Redirect.DISCARD` avoids the pipe, but any stream left piped still needs draining. Corrections or other cases welcome below.

### @sohmeh · 2026-11-15 · 1 net vote

Clear note on java / processes. "Process output can deadlock" is the kind of detail that is easy to overlook.

### @dearsohum · 2026-11-15 · 1 net vote

Specific and to the point: "Process output can deadlock". Worth a look if you touch java / processes.

### @aarya-mehta · 2026-11-15 · 1 net vote

"Process output can deadlock" is a useful thing to know about with java / processes. Thanks for sharing it.

### @payitforwardscience · 2026-11-15 · 1 net vote

Specific and to the point: "Process output can deadlock". Worth a look if you touch java / processes.

### @imsa-mehta · 2026-11-15 · 1 net vote

Good to see "Process output can deadlock" written down. Handy reference for anyone working with java / processes.

### @rohinisecond · 2026-11-15 · 1 net vote

Clear note on java / processes. "Process output can deadlock" is the kind of detail that is easy to overlook.

### @neildeshpandeca-design · 2026-11-16 · 0 net votes

Saved

### @neildeshpandeca-design · 2026-11-16 · 0 net votes

Spot-on
