Re: subprocess.Popen inheriting



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

.



Relevant Pages

  • Re: subprocess.Popen inheriting
    ... Windows, you need to call DuplicateHandle for it. ... There's also the complicating factor that the handles in windows aren't   ... This still doesn't answer whether the file descriptor return by ...
    (comp.lang.python)
  • Re: pygame and python 2.5
    ... I committed to Python because it's a great language. ... modules on the Windows platform without having a copy of Visual Studio ... developing a math library based on GMPY to use ... obsolete compiler that's not even available. ...
    (comp.lang.python)
  • Re: Please test Phatch on Windows (was Re: ANN: Phatch = PHoto bATCH processor and renamer based on
    ... You'll be happy to hear that it appears to work on Vista, though I blush to admit I actually have a Python running on that platform. ... to port the code of Phatch fully to Windows as there were many issues. ... Common - Copies the most common pixel value ...
    (comp.lang.python)
  • ANN: wxPython 2.6.2.1
    ... There have been many enhancements ... wxPython is a GUI toolkit for the Python programming language. ... Currently supported platforms are 32-bit Microsoft Windows, ...
    (comp.lang.python.announce)
  • Re: Mac e programmazione
    ... Xcode, che istalli dal mpkg o /Installers, per creare le GUI; ... per programmarle poi in Python. ... Su Mac, Python e` parte dell'OS, come lo e` Aqua per le GUI; ... Per creare un binario eseguibile su Windows (ad esempio con py2exe, ...
    (it.comp.macintosh)