Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-17-2002, 05:29 AM   #1
LQ Newbie
Registered: May 2002
Distribution: SuSE7.3
Posts: 4

Rep: Reputation: 0
Question 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
Old 05-17-2002, 12:45 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Look if the hearer file is installed (usually somewhere in /usr/include; in my Mandrake it's glibc-devel package).
Old 05-22-2002, 04:27 AM   #3
LQ Newbie
Registered: May 2002
Distribution: SuSE7.3
Posts: 4

Original Poster
Rep: Reputation: 0
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
what are the Hexadecimal function and ASCII function in Perl Bassam Programming 1 06-03-2004 02:44 AM
A main can be changed by a function local without passing anything to the function? ananthbv Programming 10 05-04-2004 02:31 PM
Is the wait function is the same as the sleep function ? Linh Programming 3 04-28-2004 01:39 PM
Perl exec function in linux (and system-function) nazula Programming 1 04-19-2004 01:21 PM
HELP, I cant get getpgid to work.... DanneSwede Linux - General 1 05-17-2002 06:59 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration