8999 SMBIOS: cleanup 32-bit specific code
[unleashed.git] / usr / src / man / man3c / clearenv.3c
blob16bd5324890019008e83e6c46912f3db9de9f8f7
1 .\"
2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
5 .\" 1.0 of the CDDL.
6 .\"
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source.  A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
10 .\"
11 .\"
12 .\" Copyright (c) 2014, Joyent, Inc.
13 .\"
14 .Dd "Dec 20, 2014"
15 .Dt CLEARENV 3C
16 .Os
17 .Sh NAME
18 .Nm clearenv
19 .Nd clear environment
20 .Sh SYNOPSIS
21 .In stdlib.h
22 .Ft int
23 .Fo clearenv
24 .Fa void
25 .Fc
26 .Sh DESCRIPTION
27 The
28 .Fn clearenv
29 function clears the contents of the environment.
30 All environment variables in the calling process are removed as though the
31 function
32 .Xr unsetenv 3C
33 had been called on every environment variable.
34 Until subsequent calls to
35 .Xr putenv 3C
37 .Xr setenv 3C
38 are made, calls to
39 .Xr getenv 3C
40 will always return
41 .Sy NULL .
42 .Sh RETURN VALUES
43 Upon successful completion,
44 .Fn clearenv
45 returns
46 .Sy 0 .
47 Otherwise, it returns a non-zero value and sets
48 .Sy errno
49 to indicate the error.
50 At this time, no errors are defined for
51 .Fn clearenv ,
52 it will always succeed.
53 Portable applications should always check the return value of
54 .Fn clearenv .
55 .Sh ERRORS
56 No errors are defined.
57 .Sh INTERFACE STABILITY
58 .Sy Committed .
59 .Sh MT-LEVEL
60 .Sy Mt-Safe .
61 .Sh SEE ALSO
62 .Xr getenv 3C ,
63 .Xr setenv 3C ,
64 .Xr unsetenv 3C ,
65 .Xr attributes 5 ,
66 .Xr environ 5 ,
67 .Xr standards 5