getusershell(3B)
NAME
getusershell, setusershell, endusershell − get legal user shells
SYNOPSIS
/usr/ucb/cc [ flag ... ] file ...
char ∗getusershell(void);
int setusershell(void);
int endusershell(void);
DESCRIPTION
getusershell returns a pointer to a legal user shell as defined by the system manager in the file /etc/shells. If /etc/shells does not exist, the locations of the standard system shells, /usr/bin/csh, /usr/bin/sh, and /usr/bin/ksh are returned.
getusershell() reads the next line (opening the file if necessary); setusershell() rewinds the file; endusershell() closes it.
FILES
/etc/shells
RETURN VALUES
The routine getusershell() returns a NULL pointer on EOF or error.
NOTES
The return values point to static data whose content is overwritten by each call.
SunOS 5.1/SPARC — Last change: 5 Jul 1990