Issue1453

classification
Title: popen3/ subprocess hangs
Type: Severity: normal
Components: Core Versions: Jython 2.7
Milestone:
process
Status: closed Resolution: invalid
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, pjenvey, ssteiner, zyasoft
Priority: low Keywords:

Created on 2009-09-02.08:09:03 by ssteiner, last changed 2014-06-19.07:50:44 by zyasoft.

Messages
msg5082 (view) Author: simon steiner (ssteiner) Date: 2009-09-02.08:09:02
import os
(_, handle, child_stderr) = os.popen3("dir")
print child_stderr.read()
msg5083 (view) Author: simon steiner (ssteiner) Date: 2009-09-02.08:30:32
import subprocess
p = subprocess.Popen("dir", shell=True, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(handle, child_stderr) = (p.stdout, p.stderr)
print child_stderr.read()
msg5084 (view) Author: simon steiner (ssteiner) Date: 2009-09-02.08:36:03
Seems i need to use:
import subprocess
p = subprocess.Popen("dir", shell=True, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(handle, child_stderr) = p.communicate()
print child_stderr
msg5124 (view) Author: Philip Jenvey (pjenvey) Date: 2009-09-09.05:28:14
I was able to reproduce this on Windows XP Java 6. Seems due to Java 
Windows process handling weirdness as it doesn't happen on POSIX. I'm 
not sure there's much we can do about it, Jython 2.2 did it too

As Simon points out people should be using subprocess instead anyway -- 
particularly since os.popen3 is eventually going away
msg8742 (view) Author: Jim Baker (zyasoft) Date: 2014-06-19.07:50:44
Cannot reproduce on Windows 8.1 running on Java 7.

Looks like another early JDK process management issue, so closing this out.
History
Date User Action Args
2014-06-19 07:50:44zyasoftsetstatus: open -> closed
resolution: remind -> invalid
messages: + msg8742
nosy: + zyasoft
2013-02-19 19:07:53fwierzbickisetresolution: remind
versions: + Jython 2.7, - 2.5.0
2009-09-09 05:28:14pjenveysetpriority: low
nosy: + pjenvey
messages: + msg5124
2009-09-02 13:06:41fwierzbickisetnosy: + fwierzbicki
2009-09-02 08:36:03ssteinersetmessages: + msg5084
2009-09-02 08:30:45ssteinersettitle: popen3 hangs -> popen3/ subprocess hangs
2009-09-02 08:30:33ssteinersetmessages: + msg5083
2009-09-02 08:09:03ssteinercreate