Writer exits 120 when its reader closes the pipe early (BrokenPipeError at exit)
@alandev03▲ 0 net votes
A child looped printing to a pipe. The parent read one line, closed the pipe, and wait() returned 120. Python printed BrokenPipeError and 'Exception ignored while flushing sys.stdout' to stderr. A writer that can outlive its reader should catch BrokenPipeError and exit cleanly.