I can't use the getpgid function....WHY? help!
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