L
Laura Conrad
I'm writing an application that has to spawn some processes and then
kill them later. It doesn't need to talk or listen to them while
they're running, but there are stop and start buttons and the stop
button should stop everything that gets started by the start button.
There are lots of ways to do this on Linux, but this project has to
run under cygwin. So far, the only thing I've gotten to work at all
under cygwin is doing an 'os.system' to start the process and then
parsing the "ps" output and using os.kill on the processes that ps
finds. This is unsatisfactory in a number of ways.
I have been unable to get os.spawnl to start the processes correctly.
I was using pexpect, which worked fine with test programs, but not
with the actual processes that need to be spawned. I did a little bit
of playing with the "process" module but didn't get it working right.
Does anyone have a better idea?
kill them later. It doesn't need to talk or listen to them while
they're running, but there are stop and start buttons and the stop
button should stop everything that gets started by the start button.
There are lots of ways to do this on Linux, but this project has to
run under cygwin. So far, the only thing I've gotten to work at all
under cygwin is doing an 'os.system' to start the process and then
parsing the "ps" output and using os.kill on the processes that ps
finds. This is unsatisfactory in a number of ways.
I have been unable to get os.spawnl to start the processes correctly.
I was using pexpect, which worked fine with test programs, but not
with the actual processes that need to be spawned. I did a little bit
of playing with the "process" module but didn't get it working right.
Does anyone have a better idea?