•  Back 
  •  GEMDOS Function Reference 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-FilePsetreuid()
Psetegid()
Psetregid()                                                          GEMDOS

Syntax

LONG Psetregid( rgid, egid )
WORD rgid;
WORD egid;

Function      Psetregid() sets the real and/or effective group id for the
              calling process.

Opcode        335 (0x014f)

Availability  Available when a 'MiNT' cookie with a version of at least
              1.12 exists.

Parameters    rgid 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.

Binding       move.w  egid,-(sp)
              move.w  rgid,-(sp)
              move.w  #$014f,-(sp)
              trap    #1
              addq.l  #6,sp

Return Value  Psetregid() returns E_OK on success or a negative GEMDOS
              error code otherwise.

Caveats       Setting group ids needs root privileges.

Comments      This call is often used by daemon processes to downgrade
              their privileges to user level.

See Also      Psetreuid(), Psetegid()