Try to fix SIGIO problem with Sun machines, h_errno with
[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.\"
36015bd1 5.\" @(#)getusershell.3 6.2 (Berkeley) %G%
778f0f70
KM
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
fe953ca4
KB
26is unreadable or does not exist,
27.I getusershell
28behaves as if
778f0f70
KM
29.I /bin/sh
30and
31.I /bin/csh
fe953ca4 32were listed in the file.
778f0f70
KM
33.PP
34.I Getusershell
35reads the next
36line (opening the file if necessary);
37.I setusershell
38rewinds the file;
39.I endusershell
40closes it.
41.SH FILES
42/etc/shells
fe953ca4
KB
43.SH "SEE ALSO"
44shells(5)
778f0f70
KM
45.SH DIAGNOSTICS
46The routine
47.I getusershell
fe953ca4 48returns a null pointer (0) on EOF.
778f0f70
KM
49.SH BUGS
50All information
51is contained in a static area
52so it must be copied if it is
53to be saved.