OSDN Git Service

1cda7433d0344087bdb854e4cb58c66dd498d48b
[linuxjm/LDP_man-pages.git] / release / man3 / clearenv.3
1 .\" Copyright 2001 John Levon <moz@compsoc.man.ac.uk>
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" Additions, aeb, 2001-10-17.
26 .\"*******************************************************************
27 .\"
28 .\" This file was generated with po4a. Translate the source file.
29 .\"
30 .\"*******************************************************************
31 .TH CLEARENV 3 2010\-10\-04 Linux "Linux Programmer's Manual"
32 .SH 名前
33 clearenv \- 環境 (environment) をクリアする
34 .SH 書式
35 .nf
36 \fB#include <stdlib.h>\fP
37 .sp
38 \fBint clearenv(void);\fP
39 .fi
40 .sp
41 .in -4n
42 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
43 .in
44 .sp
45 \fBclearenv\fP(): _SVID_SOURCE || _BSD_SOURCE
46 .SH 説明
47 \fBclearenv\fP()  関数は、名前と値が組になった全ての環境をクリアする。 さらに外部変数 \fIenviron\fP の値を NULL にする。
48 .SH 返り値
49 .\" Most versions of UNIX return -1 on error, or do not even have errors.
50 .\" Glibc info and the Watcom C library document "a nonzero value".
51 \fBclearenv\fP()  関数は、成功した場合は 0 を返し、 失敗した場合は 0 以外を返す。
52 .SH バージョン
53 libc4, libc5 では使用できない。 glibc 2.0 以降の glibc で使用できる。
54 .SH 準拠
55 (DG/UX, HP\-UX, QNX, などの) 多くの UNIX 系 OS。 (FORTRAN77 へのバインディングである) POSIX.9。
56 POSIX.1\-1996 では \fBclearenv\fP()  と \fBputenv\fP(3)  は採用されなかったが、
57 方針が変更され、この標準規格の以降の号 (B.4.6.1 を参照) では 採用されることになった。 しかし POSIX.1\-2001 では
58 \fBputenv\fP(3) だけが追加され、 \fBclearenv\fP()  の追加は否決された。
59 .SH 注意
60 この関数はセキュリティに考慮したアプリケーションで使われる。 この関数が使用できない場合は、
61 .nf
62
63     environ = NULL;
64
65 .fi
66 というように変数 environ を設定すればよい。
67 .LP
68 .\" .LP
69 .\" HP-UX has a ENOMEM error return.
70 DG/UX と Tru64 man ページには次のように記されている: \fIenviron\fP が \fBputenv\fP(3), \fBgetenv\fP(3),
71 \fBclearenv\fP()  関数以外で変更された場合、 \fBclearenv\fP()  はエラーを返し、プロセス環境は変更前のままにされる。
72 .SH 関連項目
73 \fBgetenv\fP(3), \fBputenv\fP(3), \fBsetenv\fP(3), \fBunsetenv\fP(3), \fBenviron\fP(7)
74 .SH この文書について
75 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
76 である。プロジェクトの説明とバグ報告に関する情報は
77 http://www.kernel.org/doc/man\-pages/ に書かれている。