[UP]


Manual Reference Pages  - system_getpwuid (3)

NAME

system_getpwuid(3f) - [M_system:QUERY] get login name associated with a UID (LICENSE:PD)

CONTENTS

Synopsis
Description
Option
Return Value
Example
Author
License

SYNOPSIS

function system_getpwuid(uid) result (uname)

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

DESCRIPTION

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

OPTION

uid UID to try to look up associated username for. Can be of any INTEGER type.

RETURN VALUE

uname returns the login name.

EXAMPLE

Sample program:

   program demo_system_getpwuid
   use M_system, only : system_getpwuid
   use M_system, only : system_getuid
   use,intrinsic     :: iso_fortran_env, only : int64
   implicit none
   character(len=:),allocatable :: name
   integer(kind=int64)              :: uid
      uid=system_getuid()
      name=system_getpwuid(uid)
      write(*,’("login[",a,"] has UID ",i0)’)name,uid
   end program demo_system_getpwuid

AUTHOR

John S. Urban

LICENSE

Public Domain


system_getpwuid (3) March 11, 2021
Generated by manServer 1.08 from 2525f3c5-930b-4d40-975d-f6ac7a2c4a11 using man macros.