Re: subprocess.Popen inheriting
- From: "Gabriel Genellina" <gagsl-py2@xxxxxxxxxxxx>
- Date: Wed, 17 Dec 2008 21:05:21 -0200
En Wed, 17 Dec 2008 12:21:38 -0200, Jeremy Sanders <jeremy+complangpython@xxxxxxxxxxxxxxxxx> escribió:
Aaron Brady wrote:
I thought so too. The web seems to say that on Linux they are, and on
Windows, you need to call DuplicateHandle for it.
Or set bInheritHandle=True when creating the pipe initially. os.pipe() doesn't do that.
I hit this problem - it looks like pipes aren't very versatile on Windows.
There's also the complicating factor that the handles in windows aren't the
same as the file numbers that Python uses, so you have to convert between
them.
It would be nice if Python created pipes that are properly inheritable by
default by child processes, as they're mostly used for IPC.
I'd say it is a bug in os.pipe implementation; they should be inheritable by default, as in posix (after all, the code is in "posixmodule.c").
--
Gabriel Genellina
.
- Follow-Ups:
- Re: subprocess.Popen inheriting
- From: Aaron Brady
- Re: subprocess.Popen inheriting
- References:
- subprocess.Popen inheriting
- From: Aaron Brady
- Re: subprocess.Popen inheriting
- From: Gabriel Genellina
- Re: subprocess.Popen inheriting
- From: Aaron Brady
- Re: subprocess.Popen inheriting
- From: Jeremy Sanders
- subprocess.Popen inheriting
- Prev by Date: Re: The rule of literal string
- Next by Date: C API and memory allocation
- Previous by thread: Re: subprocess.Popen inheriting
- Next by thread: Re: subprocess.Popen inheriting
- Index(es):
Relevant Pages
|