Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ endusershel(3C) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

shells(4)

getusershell(3C)

NAME

getusershell(), setusershell(), endusershell() − get legal user shells

SYNOPSIS

#include <unistd.h>

char *getusershell(void);

void setusershell(void);

void endusershell(void);

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 readable, getusershell() returns the following standard system shells:

/bin/sh
/bin/rsh
/bin/ksh
/bin/rksh
/bin/csh
/bin/pam
/usr/bin/keysh
/bin/posix/sh

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. 

WARNINGS

All information is contained in a static area and therefore must be copied if it is to be saved. 

AUTHOR

getusershell() was developed by HP and the University of California, Berkeley. 

FILES

/etc/shells

SEE ALSO

shells(4). 

Hewlett-Packard Company  —  HP-UX Release 9.10: April 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026