[UP]


Manual Reference Pages  - system_getgrgid (3)

NAME

system_getgrgid(3f) - [M_system:QUERY] get groupd name associated with a GID (LICENSE:PD)

CONTENTS

Synopsis
Description
Option
Return Value
Example
Author
License

SYNOPSIS

function system_getgrgid(gid) result (gname)

class(*),intent(in) :: gid ! any INTEGER type character(len=:),allocatable :: gname

DESCRIPTION

The system_getlogin() function returns a string containing the group name associated with the given GID. If no match is found it returns a null string and sets errno to indicate the error.

OPTION

gid GID to try to look up associated group for. Can be of any INTEGER type.

RETURN VALUE

gname returns the group name. Blank if an error occurs

EXAMPLE

Sample program:

   program demo_system_getgrgid
   use M_system, only : system_getgrgid
   use M_system, only : system_getgid
   implicit none
   character(len=:),allocatable :: name
   name=system_getgrgid( system_getgid() )
   write(*,’("group[",a,"] for ",i0)’)name,system_getgid()
   end program demo_system_getgrgid

Results:

   group[default] for 197121

AUTHOR

John S. Urban

LICENSE

Public Domain


system_getgrgid (3) July 05, 2020
Generated by manServer 1.08 from f5b4dbd5-6210-4abd-bf70-9d28e039ae5b using man macros.