[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) July 05, 2020
Generated by manServer 1.08 from 755fa4ab-544c-4a55-9575-55c0c543b8c9 using man macros.