Psetegid()

LONG Psetegid(egid)

WORD egid;
Psetegid() sets the effective group id for the calling process.
Opcode324 (0x0144)
AvailabilityAvailable when a 'MiNT' cookie with a version of at least 1.11 exists.
Parametersegid specifies the new effective group id for the calling process.
Binding
move.w	egid,-(sp)
move.w	#$0144,-(sp)
trap	#1
addq.l	#4,sp
Return ValuePsetegid() returns new egid on success or a negative GEMDOS error code otherwise.
CaveatsPrior to MiNT version 1.12 this call contained a bug affecting its functionality.

Setting effective group id needs root privileges.

CommentsThis call is often used by daemon processes to downgrade their privileges to user level.
See Also Pseteuid(), Psetgid(), Psetregid()