[New-bugs-announce] [issue12786] subprocess wait() hangs when stdin is closed

Idan Kamara report at bugs.python.org
Fri Aug 19 18:31:02 CEST 2011

New submission from Idan Kamara <idankk86 at gmail.com>:

The following program hangs on Debian, Python 2.6.6:

import subprocess

proc1 = subprocess.Popen(['cat'], stdin=subprocess.PIPE)
proc2 = subprocess.Popen(['cat'], stdin=subprocess.PIPE)


Changing the last two lines to:


Doesn't hang. The guys at #python-dev confirmed the same happens on 2.7 but not on 3.x.

components: Library (Lib)
messages: 142475
nosy: Idan.Kamara
priority: normal
severity: normal
status: open
title: subprocess wait() hangs when stdin is closed
type: resource usage
versions: Python 2.6, Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list