OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / draft / man3 / clearenv.3
1 .\" Copyright 2001 John Levon <moz@compsoc.man.ac.uk>
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Additions, aeb, 2001-10-17.
24 .\"
25 .\" Japanese Version Copyright (c) 2001-2002 Yuichi SATO
26 .\"         all rights reserved.
27 .\" Translated Sun Nov  4 22:46:03 JST 2001
28 .\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
29 .\" Updated & Modifined Mon Jul 15 02:10:29 JST 2002 by Yuichi SATO
30 .\"
31 .TH CLEARENV 3  2007-07-26 "Linux" "Linux Programmer's Manual"
32 .\"O .SH NAME
33 .SH Ì¾Á°
34 .\"O clearenv \- clear the environment
35 clearenv \- ´Ä¶­ (environment) ¤ò¥¯¥ê¥¢¤¹¤ë
36 .\"O .SH SYNOPSIS
37 .SH ½ñ¼°
38 .nf
39 .B #include <stdlib.h>
40 .sp
41 .B "int clearenv(void);"
42 .fi
43 .sp
44 .in -4n
45 .\"O Feature Test Macro Requirements for glibc (see
46 .\"O .BR feature_test_macros (7)):
47 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
48 .RB ( feature_test_macros (7)
49 »²¾È):
50 .in
51 .sp
52 .BR clearenv ():
53 _SVID_SOURCE || _XOPEN_SOURCE
54 .\"O .SH DESCRIPTION
55 .SH ÀâÌÀ
56 .\"O The
57 .\"O .BR clearenv ()
58 .\"O function clears the environment of all name-value
59 .\"O pairs and sets the value of the external variable
60 .\"O .I environ
61 .\"O to NULL.
62 .BR clearenv ()
63 ´Ø¿ô¤Ï¡¢Ì¾Á°¤ÈÃͤ¬ÁȤˤʤä¿Á´¤Æ¤Î´Ä¶­¤ò¥¯¥ê¥¢¤¹¤ë¡£
64 ¤µ¤é¤Ë³°ÉôÊÑ¿ô
65 .I environ
66 ¤ÎÃͤò NULL ¤Ë¤¹¤ë¡£
67 .\"O .SH "RETURN VALUE"
68 .SH ÊÖ¤êÃÍ
69 .\"O The
70 .\"O .BR clearenv ()
71 .\"O function returns zero on success, and a nonzero
72 .\"O value on failure.
73 .BR clearenv ()
74 ´Ø¿ô¤Ï¡¢À®¸ù¤·¤¿¾ì¹ç¤Ï 0 ¤òÊÖ¤·¡¢
75 ¼ºÇÔ¤·¤¿¾ì¹ç¤Ï 0 °Ê³°¤òÊÖ¤¹¡£
76 .\"O .\" Most versions of Unix return -1 on error, or do not even have errors.
77 .\"O .\" Glibc info and the Watcom C library document "a nonzero value".
78 .\" Unix ·Ï OS ¤Î¿¤¯¤Ï¡¢¥¨¥é¡¼¤Î¾ì¹ç¤Ë \-1 ¤òÊÖ¤¹¡£
79 .\" ¤â¤·¤¯¤Ï¥¨¥é¡¼¤Î¾ì¹ç¤Ç¤â²¿¤âÊÖ¤µ¤Ê¤¤¡£
80 .\" glibc ¤Î info ¤È Watcom C ¥é¥¤¥Ö¥é¥ê¤Ë¤Ï¡¢
81 .\" ¡Ö0 °Ê³°¤ÎÃÍ (¤òÊÖ¤¹)¡×¤Èµ­½Ò¤µ¤ì¤Æ¤¤¤ë¡£
82 .\"O .SH VERSIONS
83 .SH ¥Ð¡¼¥¸¥ç¥ó
84 .\"O Not in libc4, libc5.
85 .\"O In glibc since glibc 2.0.
86 libc4, libc5 ¤Ç¤Ï»ÈÍѤǤ­¤Ê¤¤¡£
87 glibc 2.0 °Ê¹ß¤Î glibc ¤Ç»ÈÍѤǤ­¤ë¡£
88 .\"O .SH "CONFORMING TO"
89 .SH ½àµò
90 .\"O Various Unix variants (DG/UX, HP-UX, QNX, ...).
91 .\"O POSIX.9 (bindings for FORTRAN77).
92 .\"O POSIX.1-1996 did not accept
93 .\"O .BR clearenv ()
94 .\"O and
95 .\"O .BR putenv (3),
96 .\"O but changed its mind and scheduled these functions for some
97 .\"O later issue of this standard (cf. B.4.6.1).
98 .\"O However, POSIX.1-2001
99 .\"O only adds \fBputenv\fP(3), and rejected
100 .\"O .BR clearenv ().
101 (DG/UX, HP-UX, QNX, ¤Ê¤É¤Î) Â¿¤¯¤Î Unix ·Ï OS¡£
102 (FORTRAN77 ¤Ø¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Ç¤¢¤ë) POSIX.9¡£
103 POSIX.1-1996 ¤Ç¤Ï
104 .BR clearenv ()
105 ¤È
106 .BR putenv (3)
107 ¤ÏºÎÍѤµ¤ì¤Ê¤«¤Ã¤¿¤¬¡¢
108 Êý¿Ë¤¬Êѹ¹¤µ¤ì¡¢¤³¤Îɸ½àµ¬³Ê¤Î°Ê¹ß¤Î¹æ (B.4.6.1 ¤ò»²¾È) ¤Ç¤Ï
109 ºÎÍѤµ¤ì¤ë¤³¤È¤Ë¤Ê¤Ã¤¿¡£
110 ¤·¤«¤· POSIX.1-2001 ¤Ç¤Ï
111 .BR putenv (3)
112 ¤·¤«Äɲ䵤줺¡¢
113 .BR clearenv ()
114 ¤ÎÄɲäÏÈݷ褵¤ì¤¿¡£
115 .\"O .SH NOTES
116 .SH Ãí°Õ
117 .\"O Used in security-conscious applications.
118 .\"O If it is unavailable
119 .\"O the assignment
120 ¤³¤Î´Ø¿ô¤Ï¥»¥­¥å¥ê¥Æ¥£¤Ë¹Íθ¤·¤¿¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç»È¤ï¤ì¤ë¡£
121 ¤³¤Î´Ø¿ô¤¬»ÈÍѤǤ­¤Ê¤¤¾ì¹ç¤Ï¡¢
122 .nf
123
124     environ = NULL;
125
126 .fi
127 .\"O will probably do.
128 ¤È¤¤¤¦¤è¤¦¤ËÊÑ¿ô environ ¤òÀßÄꤹ¤ì¤Ð¤è¤¤¡£
129 .LP
130 .\"O The DG/UX and Tru64 man pages write: If
131 .\"O .I environ
132 .\"O has been modified by anything other than the
133 .\"O .BR putenv (3),
134 .\"O .BR getenv (3),
135 .\"O or
136 .\"O .BR clearenv ()
137 .\"O functions, then
138 .\"O .BR clearenv ()
139 .\"O will return an error and the process environment will remain unchanged.
140 DG/UX ¤È Tru64 man ¥Ú¡¼¥¸¤Ë¤Ï¼¡¤Î¤è¤¦¤Ëµ­¤µ¤ì¤Æ¤¤¤ë¡§
141 .I environ
142 ¤¬
143 .BR putenv (3),
144 .BR getenv (3),
145 .BR clearenv ()
146 ´Ø¿ô°Ê³°¤ÇÊѹ¹¤µ¤ì¤¿¾ì¹ç¡¢
147 .BR clearenv ()
148 ¤Ï¥¨¥é¡¼¤òÊÖ¤·¡¢¥×¥í¥»¥¹´Ä¶­¤ÏÊѹ¹Á°¤Î¤Þ¤Þ¤Ë¤µ¤ì¤ë¡£
149 .\" .LP
150 .\"O .\" HP-UX has a ENOMEM error return.
151 .\" HP-UX ¤Ë¤Ï ENOMEM ¥¨¥é¡¼¤¬¤¢¤ë¡£
152 .\"O .SH "SEE ALSO"
153 .SH ´ØÏ¢¹àÌÜ
154 .BR getenv (3),
155 .BR putenv (3),
156 .BR setenv (3),
157 .BR unsetenv (3),
158 .BR environ (7)