HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
g
getusershell(3C) getusershell(3C)
NAME
getusershell(), setusershell(), endusershell() - get legal user shells
SYNOPSIS
#include <unistd.h>
char *getusershell(void);
void setusershell(void);
void endusershell(void);
Obsolescent Interfaces
char *getusershell_r(char **shell_datap);
void setusershell_r(char **shell_datap);
void endusershell_r(char **shell_datap);
DESCRIPTION
getusershell()
Returns a pointer to the first legal user shell as defined in the file
/etc/shells (see shells(4)). If /etc/shells does not exist or is not read-
able, getusershell() returns the following standard system shells:
/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh
as if they were contained in /etc/shells . The file is left open so that the
next call returns the next shell. A null pointer (0) is returned on EOF or error.
setusershell() Rewinds the file.
endusershell() Closes the file.
Obsolescent Interfaces
getusershell_r(), setusershell_r()
, endusershell_r() get legal user shells.
APPLICATION USAGE
getusershell(), setusershell()
and endusershell() are thread-safe. These interfaces are
not async-cancel-safe. A cancellation point may occur when a thread is executing
getusershell() or
setusershell().
WARNINGS
getusershell_r(), setusershell_r() and endusershell_r() are obsolescent interfaces
supported only for compatibility with existing DCE applications. New multithreaded applications should
use getusershell(), setusershell()
and endusershell().
AUTHOR
getusershell() was developed by HP and the University of California, Berkeley.
FILES
/etc/shells
SEE ALSO
shells(4).
HP-UX Release 11i: December 2000 − 1 − Section 3−−363
___
___