getpgid, setpgid

From: Remco Nonhebel (nonhebel@umailme.com)
Date: Fri Apr 28 2000 - 06:35:04 EST


Hi there, my name is Remco Nonhebel

I'm writing a program (wpbd) that has to be started by inetd, okay, I
got that working. This program has to kill another process (called
WPBHost), that's working too, but at the end of wpbd the WPBHost-program
has to be started again. Now there I have a problem. wpbd is
cummunicating, using the inetd.

To create the new WPBHost process I use fork and execve. When I close
the connection with the client, the WPBHost program is also killed by
the inetd, and that is exacly NOT what I want. I heard that my newly
created WPBHost is at that point a member of the inetd. In the man-pages
I found out that with getpgid (get process group ID, I suppose) and
setpgid I can manipulate the group ID of the process. If I do:

setpgid(0,10000);

then

getpgid(0);

does not give me 10000 in return.... Why not, and what else can I try to
prevent WPBHost to be killed by inetd

If anyone has any ideas, I would be very thankful
Oh, before I forget, could you please reply to: nonhebel@umailme.com

greetings Remco

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:15 EST