Hi all, I've written a Windows service based on win32serviceutil.ServiceFramework. The service per se is running just fine. I am testing it on Windows Server 2003.
When starting, the service uses the win32process.CreateProcess to start a process: win32process.CreateProcess(None, <CMDLINE>, None, None, 0, 0, None, <WORKINGDIR>, win32process.STARTUPINFO()) This process is a new Python interpreter which allows me better control over setting up the the environment (e.g. PYTHONPATH) in order to invoke code outside of the system's PYTHONPATH. The service is using win32event.WaitForMultipleObjects to keep track of this process. That part works fine as well. Where I am failing is an attempt to spawn a subprocess from my service's new Python process. I have tried all kinds of parameter combinations for subprocess.call and subprocess.check_output, and tried win32process.CreateProcess as well. It all works fine when running my service from the command line using the "debug" flag. But when the service is started with the "start" flag (or from the Service Manager), the command line process I am spawning last always hangs. Funny detail: The same code works fine under Windows 7. Can anyone show me how to debug the hanging subprocess? Thanks! jens
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32