furrypop has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

This is kind of a follow-up to node Daemon processing under different IDs..

It's been pointed out to me that the daemon processes my Perl script is spawning are under the correct UID, but not the correct group. In fact, they are running under "other" (since they're created by root).

I changed the script to make use of POSIX's setpgid, but I get the error "not owner", despite re-confirming that it's running as root. It doesn't seem to work if I change $( and $) directly.

So, how do I ensure that Perl daemon processes are created under the correct user group?

Thanks,

J.

UPDATE - duh. I'll use setgid, not setpgid. Oops.