Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > G

getusershell(3C)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

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 readable, 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.

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

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.