This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: subprocess pipe fails under Emacs
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: astrand Nosy List: andersjm, astrand
Priority: normal Keywords:

Created on 2005-03-15 14:49 by andersjm, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg24649 - (view) Author: Anders J. Munch (andersjm) Date: 2005-03-15 14:49
Creating a pipe with subprocess.Popen fails if Python
is running in a non-interactive subshell under XEmacs
on MSWin.

This program
  import subprocess
  pipe = subprocess.Popen(['cmd', '/c', r'echo', 'Hi
there!'],
                        stdout=subprocess.PIPE)
  print pipe.stdout.read()

produces the expected "Hi there!" when run from a
console. But when run from an XEmacs non-interactive
subshell, I get this traceback:

Traceback (most recent call last):
  File "C:\temp\subprocessbug.py", line 3, in ?
    stdout=subprocess.PIPE)
  File "c:\App\Dev\Python24\lib\subprocess.py", line
545, in __init__
    (p2cread, p2cwrite,
  File "c:\App\Dev\Python24\lib\subprocess.py", line
605, in _get_handles
    p2cread = self._make_inheritable(p2cread)
  File "c:\App\Dev\Python24\lib\subprocess.py", line
646, in _make_inheritable
    DUPLICATE_SAME_ACCESS)
TypeError: an integer is required

Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32
bit (Intel)]
W2K, XEmacs 21.4p13
msg24650 - (view) Author: Peter Åstrand (astrand) * (Python committer) Date: 2005-03-19 07:07
Logged In: YES 
user_id=344921

This problem has been reported on bug 1126208. 
History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41705
2005-03-15 14:49:55andersjmcreate