Fix to correct command hex value.
[unix-history] / usr / src / lib / libc / gen / getusershell.3
CommitLineData
778f0f70
KM
1.\" Copyright (c) 1985 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)getusershell.3 6.1 (Berkeley) %G%
6.\"
7.TH GETUSERSHELL 3 ""
8.UC 6
9.SH NAME
10getusershell, setusershell, endusershell \- get legal user shells
11.SH SYNOPSIS
12.nf
13.B char *getusershell()
14.PP
15.B setusershell()
16.PP
17.B endusershell()
18.fi
19.SH DESCRIPTION
20.I Getusershell
21returns a pointer to a legal user shell as defined by the
22system manager in the file
23.IR /etc/shells .
24If
25.I /etc/shells
26does not exist, the two standard system shells
27.I /bin/sh
28and
29.I /bin/csh
30are returned.
31.PP
32.I Getusershell
33reads the next
34line (opening the file if necessary);
35.I setusershell
36rewinds the file;
37.I endusershell
38closes it.
39.SH FILES
40/etc/shells
41.SH DIAGNOSTICS
42The routine
43.I getusershell
44returns a null pointer (0) on EOF or error.
45.SH BUGS
46All information
47is contained in a static area
48so it must be copied if it is
49to be saved.