*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> setrgid (3)              
Title
Content
Arch
Section
 

setrgid(3)

Contents


NAME    [Toc]    [Back]

       setrgid, setegid - Set the process's group IDs

SYNOPSIS    [Toc]    [Back]

       #include <sys/types.h>

       int setrgid(
                 gid_t rgid ); int setegid(
               gid_t egid );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

PARAMETERS    [Toc]    [Back]

       Specifies the value of the real group ID to be set.  Specifies
 the value of the effective group ID to be set.

DESCRIPTION    [Toc]    [Back]

       The setegid() function sets the process's effective  group
       ID  to the value of the egid parameter if the egid parameter
 is equal to the  current  real,  effective,  or  saved
       group ID.

       The setrgid() function sets the process's real group ID to
       the value of the rgid parameter.

       Only the superuser may change the real or effective  group
       ID  to  a value other than the current real or saved group
       ID of the process.

RETURN VALUES    [Toc]    [Back]

       Upon successful completion, the  setegid()  and  setrgid()
       functions  return  a value of 0 (zero). If either function
       fails, a value of -1 is returned and errno is set to indicate
 the error.

ERRORS    [Toc]    [Back]

       If the setrgid() or setegid() function fails, errno is set
       to one of the following values: The rgid or egid parameter
       is  not equal to either the real or saved group IDs of the
       process and the calling process does  not  have  superuser
       privilege.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: getgroups(2), setgroups(2), setluid(3),

       Commands: groups(1).



                                                       setrgid(3)
[ Back ]
 Similar pages
Name OS Title
nsg_attach_pid Tru64 Attaches a process to, or detaches a process from a NUMA Scheduling Group (libnuma library)
nsg_detach_pid Tru64 Attaches a process to, or detaches a process from a NUMA Scheduling Group (libnuma library)
pgsignal FreeBSD post signal to a process or process group
gsignal FreeBSD post signal to a process or process group
psignal FreeBSD post signal to a process or process group
pfind OpenBSD find process / process group by number
pgfind OpenBSD find process / process group by number
getpgrp HP-UX get process, process group and parent process ID.
getpid HP-UX get process, process group and parent process ID.
getpgrp2 HP-UX get process, process group and parent process ID.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service