do anonymous pipes normally work on NT?

Mark Hammond MHammond at skippinet.com.au
Sat Jun 12 19:25:48 EDT 1999


Nothing is particularly obvious, although the code is too large to really be
sure.

* Have you seen win32pipe.popen*?

* I can't see where you keep references to the handles for the sub-process.
Is it possible that the handles are being closed by the parent process,
thereby closing the child process handles?

* Personally I would use win32file.CreateFile instead of
os.open/msvcrt.get_osfhandle.  One advantage is that a layer of indirection
you are not using is removed.  Second advantage is that you deal with
"PyHANDLE" objects, and explicit closing is not necessary (a-la files)

* You may have more luck spotting the problem (or getting someone else to)
if you provide all this in a single, general purpose function.

def CoProc( command_line, infile, outfile ):
  ...

with all command-line parsing and other app specific stuff that doesnt
relate to the problem removed.

Hope this helps...

Mark.







More information about the Python-list mailing list