do anonymous pipes normally work on NT?

Mark Hammond MHammond at skippinet.com.au
Wed Jun 16 03:01:06 EDT 1999


Im afraid I can't be of much help here.  I have had a good play, and nothing
seems obvious.

Interestingly, if you change cat.py to:

    f.write("Stdin fileno is %s\n" % (sys.stdin.fileno(), ))
    f.write("Stdin handle is %s\n" %
(msvcrt.get_osfhandle(sys.stdin.fileno()), ) )

You will notice that when run "normally", stdin has a fileno of 0, and a
valid handle.  However, when run by runproc.py, the fileno is -1, and
attempting to get back the handle fails.  If I had more time I would dig
into where fileno() gets its value from, and see if this points to why we
are failing.

Adding
except:
    traceback.print_exc(file=f)

Also helps see this stuff.  I am afraid I am all out of time with this
stuff.  If you are really keen, the next step would probably be to recode
this small sample in C, and see if that works.  If it does, Python (or the
win32 extensions) has a problem we should fix as a matter of priority.  If
not, then we need to find the magic words to chant to make it work from C,
and move that back to Python...

Mark.






More information about the Python-list mailing list