diff options
author | Robert Mustacchi <rm@joyent.com> | 2014-12-19 23:24:17 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2014-12-27 08:30:21 -0800 |
commit | 89b9271284be1a4e3e3053d7bc12f9bbf8145b06 (patch) | |
tree | b1f676d2aca2488e3e7ae5ea6da3ae573c090ed9 | |
parent | 195b26986e3c19e916bf0991a1af7ae87d43010b (diff) | |
download | illumos-joyent-89b9271284be1a4e3e3053d7bc12f9bbf8145b06.tar.gz |
3827 clearenv() needs a manpage
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r-- | usr/src/man/man3c/Makefile | 1 | ||||
-rw-r--r-- | usr/src/man/man3c/clearenv.3c | 64 | ||||
-rw-r--r-- | usr/src/man/man3c/unsetenv.3c | 10 | ||||
-rw-r--r-- | usr/src/man/man3lib/libc.3lib | 3 | ||||
-rw-r--r-- | usr/src/pkg/manifests/system-library.man3c.inc | 1 |
5 files changed, 71 insertions, 8 deletions
diff --git a/usr/src/man/man3c/Makefile b/usr/src/man/man3c/Makefile index 3aa6291375..6841dc9a7c 100644 --- a/usr/src/man/man3c/Makefile +++ b/usr/src/man/man3c/Makefile @@ -60,6 +60,7 @@ MANFILES= __fbufsize.3c \ catopen.3c \ cfgetispeed.3c \ cfsetispeed.3c \ + clearenv.3c \ clock.3c \ clock_nanosleep.3c \ clock_settime.3c \ diff --git a/usr/src/man/man3c/clearenv.3c b/usr/src/man/man3c/clearenv.3c new file mode 100644 index 0000000000..1bf5cbde17 --- /dev/null +++ b/usr/src/man/man3c/clearenv.3c @@ -0,0 +1,64 @@ +.\" +.\" This file and its contents are supplied under the terms of the +.\" Common Development and Distribution License ("CDDL"), version 1.0. +.\" You may only use this file in accordance with the terms of version +.\" 1.0 of the CDDL. +.\" +.\" A full copy of the text of the CDDL should have accompanied this +.\" source. A copy of the CDDL is also available via the Internet at +.\" http://www.illumos.org/license/CDDL. +.\" +.\" +.\" Copyright (c) 2014, Joyent, Inc. +.\" +.Dd "Dec 20, 2014" +.Dt CLEARENV 3C +.Os +.Sh NAME +.Nm clearenv +.Nd clear environment +.Sh SYNOPSIS +.In stdlib.h +.Ft int +.Fo clearenv +.Fa void +.Fc +.Sh DESCRIPTION +The +.Fn clearenv +function clears the contents of the environment. All environment variables in +the calling process are removed as though the function +.Xr unsetenv 3C +had been called on every environment variable. Until subsequent calls to +.Xr putenv 3C +or +.Xr setenv 3C +are made, calls to +.Xr getenv 3C +will always return +.Sy NULL . +.Sh RETURN VALUES +Upon successful completion, +.Fn clearenv +returns +.Sy 0 . +Otherwise, it returns a non-zero value and sets +.Sy errno +to indicate the error. At this time, no errors are defined for +.Fn clearenv , +it will always succeed. Portable applications should always check the return +value of +.Fn clearenv . +.Sh ERRORS +No errors are defined. +.Sh INTERFACE STABILITY +.Sy Committed . +.Sh MT-LEVEL +.Sy Mt-Safe . +.Sh SEE ALSO +.Xr getenv 3C , +.Xr unsetenv 3C , +.Xr setenv 3C , +.Xr attributes 5 , +.Xr environ 5 , +.Xr standards 5 diff --git a/usr/src/man/man3c/unsetenv.3c b/usr/src/man/man3c/unsetenv.3c index 806206a720..3fc11e8b87 100644 --- a/usr/src/man/man3c/unsetenv.3c +++ b/usr/src/man/man3c/unsetenv.3c @@ -8,7 +8,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH UNSETENV 3C "Nov 1, 2003" +.TH UNSETENV 3C "Dec 20, 2014" .SH NAME unsetenv \- remove an environment variable .SH SYNOPSIS @@ -20,7 +20,6 @@ unsetenv \- remove an environment variable .fi .SH DESCRIPTION -.sp .LP The \fBunsetenv()\fR function removes an environment variable from the environment of the calling process. The \fIname\fR argument points to a string @@ -34,12 +33,10 @@ If the application modifies \fIenviron\fR or the pointers to which it points, the behavior of \fBunsetenv()\fR is undefined. The \fBunsetenv()\fR function updates the list of pointers to which \fIenviron\fR points. .SH RETURN VALUES -.sp .LP Upon successful completion, 0 is returned. Otherwise, -1 is returned, \fBerrno\fR set to indicate the error, and the environment is left unchanged. .SH ERRORS -.sp .LP The \fBunsetenv()\fR function will fail if: .sp @@ -53,7 +50,6 @@ to a string containing an '=' character. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -71,6 +67,6 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .LP -\fBgetenv\fR(3C), \fBsetenv\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5) +\fBclearenv\fR(3C), \fBgetenv\fR(3C), \fBsetenv\fR(3C), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3lib/libc.3lib b/usr/src/man/man3lib/libc.3lib index d4065bda51..5dd25501d6 100644 --- a/usr/src/man/man3lib/libc.3lib +++ b/usr/src/man/man3lib/libc.3lib @@ -163,7 +163,8 @@ l l . \fBcfsetospeed\fR \fBcftime\fR \fBchdir\fR \fBchmod\fR \fBchown\fR \fBchroot\fR -\fBclearerr\fR \fBclock\fR +\fBclearerr\fR \fBclearenv\fR +\fBclock\fR \fBclock_getres\fR \fBclock_gettime\fR \fBclock_nanosleep\fR \fBclock_settime\fR \fBclose\fR \fBclosedir\fR diff --git a/usr/src/pkg/manifests/system-library.man3c.inc b/usr/src/pkg/manifests/system-library.man3c.inc index a00e4e1d79..bac8b10985 100644 --- a/usr/src/pkg/manifests/system-library.man3c.inc +++ b/usr/src/pkg/manifests/system-library.man3c.inc @@ -56,6 +56,7 @@ file path=usr/share/man/man3c/catgets.3c file path=usr/share/man/man3c/catopen.3c file path=usr/share/man/man3c/cfgetispeed.3c file path=usr/share/man/man3c/cfsetispeed.3c +file path=usr/share/man/man3c/clearenv.3c file path=usr/share/man/man3c/clock.3c file path=usr/share/man/man3c/clock_nanosleep.3c file path=usr/share/man/man3c/clock_settime.3c |