avoid throwing away errors when reinitializing (from guy@sun.com)
[unix-history] / usr / src / share / man / man7 / environ.7
CommitLineData
8404041d
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
c3457a1f 5.\" @(#)environ.7 6.1 (Berkeley) %G%
8404041d 6.\"
c3457a1f 7.TH ENVIRON 7 ""
8404041d
KM
8.UC 5
9.SH NAME
10environ \- user environment
11.SH SYNOPSIS
12.B extern char **environ;
13.SH DESCRIPTION
14An array of strings called the `environment' is made available by
15.IR execve (2)
16when a process begins. By convention these strings have the form
17.RI ` name = value '.
18The following names are used by various commands:
19.TP "\w'TERMCAP 'u"
20PATH
21The sequence of directory prefixes that
22.I sh, time,
23.IR nice (1),
24etc., apply in searching for a file known by an incomplete path name.
25The prefixes are separated by `:'.
26.IR Login (1)
27sets PATH=:/usr/ucb:/bin:/usr/bin.
28.TP
29HOME
30A user's login directory, set by
31.IR login (1)
32from the password file
33.IR passwd (5).
34.TP
35TERM
36The kind of terminal for which output is to be prepared.
37This information is used by commands, such as
38.I nroff
39or
40.IR plot (1G),
41which may exploit special terminal capabilities. See
42.I /etc/termcap
43.RI ( termcap (5))
44for a list of terminal types.
45.TP
46SHELL
47The file name of the users login shell.
48.TP
49TERMCAP
50The string describing the terminal in TERM, or the name of the termcap file, see
51.IR termcap (5), termcap (3X).
52.TP
53EXINIT
54A startup list of commands read by
55.IR ex (1),
56.IR edit (1),
57and
58.IR vi (1).
59.TP
60USER
61The login name of the user.
62.TP
63PRINTER
64The name of the default printer to be used by
65.IR lpr (1),
66.IR lpq (1),
67and
68.IR lprm (1).
69.PP
70Further names may be placed in the environment by the
71.I export
72command and `name=value' arguments in
73.IR sh (1),
74or by the
75.I setenv
76command if you use
77.IR csh (1).
78Arguments may also be placed in the environment at the point of an
79.IR execve (2).
80It is unwise to conflict with certain
81.IR sh (1)
82variables that are frequently exported by `.profile' files:
83MAIL, PS1, PS2, IFS.
84.SH SEE ALSO
85csh(1),
86ex(1),
87login(1),
88sh(1),
89execve(2),
90system(3),
91termcap(3X),
92termcap(5)