[python-win32] Killing a subprocess spawned by a service

2013-06-18 Thread Patrick Tisdale
Hello list, I have written a test script to run as a service. The service starts up properly, and spawns a subprocess (called test.py) using subprocess.Popen. However, I am having no luck killing the subprocess when I stop the service. I am using os.kill() It works fine when running

Re: [python-win32] Killing a subprocess spawned by a service

2013-06-18 Thread Mark Hammond
The other solutions I can think of are likely heavier and harder than arranging to spawn the child without shell=1 - so I'd suggest tackling that. Or *maybe* - you could do something like spawning a thread in the child process to read from stdin - that's likely to block until the cmd.exe