I can't use the getpgid function....WHY? help!
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 Thanks/ Daniel |
Look if the hearer file is installed (usually somewhere in /usr/include; in my Mandrake it's glibc-devel package).
|
The headerfile is installed and included, so that is not the problem. I can use some of the functions in the file, including "setpgid" but not "getpgid" which is very!!! frustrating.
I found out that getpgid conforms to some other semaphore ,SVr4, but I dont know what to do to get the functionality from this semaphore. I'm reading about SEMOP and some other stuff right know but I cant figure out how to do this. thanks/ D |
All times are GMT -5. The time now is 06:39 PM. |