HELP, I cant get getpgid to work....
Hi there,
I'm having some problems getting my processhandling program to work properly. When I use the program to start an application I just run it like a systemcommand e.g. "mozilla". This starts up the program fine. The problem is that i want to be able to kill the application from my program using some killcommand , but when I call kill() it just kills the startup process and not the four others that is launched by this process and are the "real" application.
Therefore I must have some way of getting hold of the pids for all four processes or their group pid. However, and this is my real problem, I cant use getpgid that is made for this porpose and lays in the <unistd.h> -file. WHY!!! Please help me.
I'm using KDeveloper/Qt and the distrib SuSE7.3.
Saw something in "man" like "getpgid conforms to SVr4", I was informed breafly what it means but I dont know what to do about it or if I even have to do anything about it.
Thanks/ Daniel
|