Capture PID of child process
P at draigBrady.com
P at draigBrady.com
Wed Aug 6 07:43:19 EDT 2003
klappnase wrote:
> Hello, everyone,
>
> I am running python2.2.2 on a linux box.
> I want to call a shell command and get the PID of this child process
> so I have the possibility to abort the child process while it is still
> running.
>
> I tried the popen2 module for that:
>
> self.pp = popen2.Popen3(cmd)
I modified this a bit to create my own class,
which allows me to kill the whole process group
and wait for completion. See the fslint_backend
class in http://www.pixelbeat.org/fslint/FSlint-2.02.tar.gz
Pádraig.
More information about the Python-list
mailing list