LONG Psetregid(rgid, egid)

WORD rgid;
WORD egid;
Psetregid() sets the real and/or effective group id for the calling process.
Opcode335 (0x014f)
AvailabilityAvailable when a 'MiNT' cookie with a version of at least 1.12 exists.
Parametersrgid specifies the new real group id and egid specifies the new effective group id for the calling process. If either argument is -1, only the other gets changed.
move.w	egid,-(sp)
move.w	rgid,-(sp)
move.w	#$014f,-(sp)
trap	#1
addq.l	#6,sp
Return ValuePsetregid() returns E_OK on success or a negative GEMDOS error code otherwise.
CaveatsSetting group ids needs root privileges.
CommentsThis call is often used by daemon processes to downgrade their privileges to user level.
See Also Psetreuid(), Psetegid()