What, specifically, happens when I change the real and/or effective user and group ID of a process? To be more specific, if the program is initially running as root, or setuid root, and I change the real and/or effective user/group of the process to, say, that of a specific user, does all of that processes root privilages go away? I want to be able to fork() a process to be run as a specific user with the same privilages as that user, from an originally root-owned process.
I suspect the answer is pretty obvious, but I'm too lazy to test it out, since I'm still in the planning stage ;)
And yes I know this is a unix question and not really a perl one, but it's in the context of a perl project I'm planning.