> With a bit of guessing, I think I've found what's happening. > Since you don't provide a value for stdin, None is used. Inside > subprocess.py, method _get_handles, line 670, GetStdHandle *may* return > None; in that case _make_inheritable fails. > If you print the value of p2cread in line 670 I bet you'll get None. > The fix is to test for None in _make_inheritable (line 720): > > if handle is not None: > return DuplicateHandle(...) > > (else return None, implicit) > > >> When I call spawn() from an application, it works just fine. Any ideas? >> > > According to http://msdn2.microsoft.com/en-us/library/ms683231.aspx > GetStdHandle may return NULL (translated to None in Python) when invoked > from a service with no redirected standard handles. From an application, > there is no problem. > > Please try the simple fix above to comfirm it works; I'll submit a patch > if that's the case. > Yes, it fixed the problem. Please submit the patch. Thank you!
Laszlo -- http://mail.python.org/mailman/listinfo/python-list