Skip to main content

get_users

Function get_users 

Source
pub fn get_users() -> Vec<String>
Expand description

Retrieve a sorted list of currently logged-in user names from utmpx. If file is Some, reads from that file; otherwise uses the default database with systemd fallback.

§Safety

Uses libc’s setutxent/getutxent/endutxent which are not thread-safe. This function must not be called concurrently.