killing child processes

Padraig at Linux.ie Padraig at Linux.ie
Wed Apr 9 05:49:54 EDT 2003


reinhard wrote:
> I've created a process (some batchfile) which in turn creates some
> long running child processes using the win32api CreateProcess call
> (declaring them as a group).
> 
> Is there a way to terminate (kill) all the child processes in the
> group?

yep. just fork() and setpgrp()
Then all processes will have the
same groupid which you can kill(-groupid)
You can look at the code in FSlint:
http://www.pixelbeat.org/fslint/FSlint-2.01.tar.gz

Padraig.





More information about the Python-list mailing list