getusershell(3) — Subroutines
OSF
NAME
getusershell, setusershell, endusershell − Gets names of legal user shells
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
char ∗getusershell( void );
int setusershell( void );
int endusershell( void );
DESCRIPTION
The getusershell() function returns a pointer to a string that contains the name of a legal user shell as defined by the system manager in the /etc/shells file. If the /etc/shells file does not exist, the standard system shells are returned.
The getusershell() function reads the next line of the /etc/shells file, opening it if necessary. The setusershell() function rewinds the file, and the endusershell() function closes it.
NOTES
The returned information is in a static area. It must be copied if it is to be saved.
RETURN VALUES
Upon successful completion, a pointer to a character string is returned. A null pointer is returned on EOF (End-of-File) or error.
FILES
/etc/shells Contains the names of legal user shells.