C Library Functions - 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
Examples
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.
|
|
EXAMPLES
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
| Nemo Release 3.1 | system_getpwuid (3) | June 29, 2025 |
Generated by manServer 1.08 from da29c495-eea9-4230-a5c8-9c7a8b683865 using man macros.