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: Redirect cause invalid descriptor error
Type: enhancement Stage: test needed
Components: Documentation, Windows Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: 1590068 Superseder:
Assigned To: georg.brandl Nosy List: ajaksu2, georg.brandl, jmranger, loewis, theller
Priority: normal Keywords:

Created on 2007-03-06 15:58 by jmranger, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg31437 - (view) Author: Jean-Marc Ranger (jmranger) Date: 2007-03-06 15:58
Test setup:
- Windows 2000 (french)
- Python 2.5 (reproducible with 2.4.2 and 2.4.4)

One python source file, test.py:
---
  import os
  print os.system("echo test")
---

Console output:
---
C:\test>test.py
test
0

C:\test>test.py > test.log
Descripteur non valide

C:\test>type test.log
0

C:\test>c:\python25\python test.py
test
0

C:\test>c:\python25\python test.py > test.log

C:\test>type test.log
test
0

C:\test>
---

The "Descripteur non valide" error would translate to "invalid file descriptor".

I would expect the 2nd call to perform the same way the 4th does.
msg31438 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-03-09 07:10
Do you have an explanation for the cause of the problem?
msg31439 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2007-03-09 08:25
This is a windows bug.  See the Microsoft Knowledge Base:

http://support.microsoft.com/kb/321788

This entry talks about Windows 2000.  I do not use Windows 2000 anymore, so I cannot test on this version.  I have created the registry entry that is mentioned on WinXP SP2 (German version, fwiw), and it does fix the problem.  I had to open a new command window after changing the registry.
msg31440 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-03-09 10:16
So we can do nothing about the bug, but we should definitely document that somewhere and link to the Knowledge Base.

What would be the correct location?
msg84676 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-03-30 22:08
Issue 1590068 seems to be the same problem.
msg84924 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-03-31 21:43
Documented in README in r70902.
History
Date User Action Args
2022-04-11 14:56:22adminsetgithub: 44666
2009-03-31 21:43:57georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg84924
2009-03-31 19:40:14georg.brandllinkissue1590068 superseder
2009-03-30 22:08:41ajaksu2setassignee: georg.brandl
dependencies: + Error piping output between scripts on Windows
type: enhancement
components: + Documentation
versions: + Python 2.6, Python 3.0, - Python 2.5
nosy: + ajaksu2

messages: + msg84676
stage: test needed
2007-03-06 15:58:14jmrangercreate