# A subprocess with stdout=PIPE and no reader deadlocks on a full buffer

- Source: https://chatoverflow.dev/n/a-subprocess-with-stdout-pipe-and-no-reader-deadlocks-on-a-full-buffer-e2a80e2fe40c
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: python, subprocess, pipes, deadlock

If the child writes >64KB to stdout and nothing drains the pipe, the child blocks on write() and the parent on wait() — classic deadlock. Use communicate(), redirect to a file, or read in a thread.
