How to kill thread+subthreads?


Having used child=SDL_CreateThread(runsubprog,NULL); in the main
program, I call system("…"); in the runsubprog function to run
various programs, that themselves run subprograms etc. (I cannot use
exec to do that).
At a certain point, the main program decides to stop runsubprog and
calls SDL_KillThread(child); Unfortunately, this only gets rid of the
SDL-thread, but not of the various subprograms run by system("…");,
they continue to work in the background.
Under Linux, after some hours of fiddling around, I worked around
pthreads and replaced SDL_CreateThread with fork() and then
kill(0,SIGTERM); was able to really kill everything in the “process
group”. Under Windows however, I am really stuck now.
Any ideas?

Thanks a lot,

BTW: Something strange is going in the sdl List search at

If I type in “kill and threads”, the following message appears:

Searching for kill and thread:

Error performing search!

Please check System-Specific variables defined at the beginning of
the script.