Is it possible to restrict a process from changing it's process group? For example, user
nobody seems to be able to call
setpgid(0, 0) which sets process group of current process to pid of that process. (
setpgid(0, non-zero-number) is denied, however).
I doubt that the outcome of achieving this would be what you would expect, and it would have a negative impact your system, rather than a positive one, with potentially negative impacts on signal handling and terminal I/O.
In fact, there are restrictions on the process group IDs that are allowed to be set, in most cases the controlling tty's process group ID, which is why not being able to set it would have negative impacts on signal handling and terminal I/O. This is a security benefit
Here's a good reference on process groups: http://www.cs.ucsb.edu/~almeroth/classes/W99.276/assignment1/signals.html#Pgrps
You may get a good answer asking this on stackoverflow.com, too.