.\" Copyright 2001 John Levon .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Additions, aeb, 2001-10-17. .\" .\" Japanese Version Copyright (c) 2001-2002 Yuichi SATO .\" all rights reserved. .\" Translated Sun Nov 4 22:46:03 JST 2001 .\" by Yuichi SATO .\" Updated & Modifined Mon Jul 15 02:10:29 JST 2002 by Yuichi SATO .\" .TH CLEARENV 3 2007-07-26 "Linux" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O clearenv \- clear the environment clearenv \- 環境 (environment) をクリアする .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .sp .B "int clearenv(void);" .fi .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .BR clearenv (): _SVID_SOURCE || _XOPEN_SOURCE .\"O .SH DESCRIPTION .SH 説明 .\"O The .\"O .BR clearenv () .\"O function clears the environment of all name-value .\"O pairs and sets the value of the external variable .\"O .I environ .\"O to NULL. .BR clearenv () 関数は、名前と値が組になった全ての環境をクリアする。 さらに外部変数 .I environ の値を NULL にする。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O The .\"O .BR clearenv () .\"O function returns zero on success, and a nonzero .\"O value on failure. .BR clearenv () 関数は、成功した場合は 0 を返し、 失敗した場合は 0 以外を返す。 .\"O .\" Most versions of Unix return -1 on error, or do not even have errors. .\"O .\" Glibc info and the Watcom C library document "a nonzero value". .\" Unix 系 OS の多くは、エラーの場合に \-1 を返す。 .\" もしくはエラーの場合でも何も返さない。 .\" glibc の info と Watcom C ライブラリには、 .\" 「0 以外の値 (を返す)」と記述されている。 .\"O .SH VERSIONS .SH バージョン .\"O Not in libc4, libc5. .\"O In glibc since glibc 2.0. libc4, libc5 では使用できない。 glibc 2.0 以降の glibc で使用できる。 .\"O .SH "CONFORMING TO" .SH 準拠 .\"O Various Unix variants (DG/UX, HP-UX, QNX, ...). .\"O POSIX.9 (bindings for FORTRAN77). .\"O POSIX.1-1996 did not accept .\"O .BR clearenv () .\"O and .\"O .BR putenv (3), .\"O but changed its mind and scheduled these functions for some .\"O later issue of this standard (cf. B.4.6.1). .\"O However, POSIX.1-2001 .\"O only adds \fBputenv\fP(3), and rejected .\"O .BR clearenv (). (DG/UX, HP-UX, QNX, などの) 多くの Unix 系 OS。 (FORTRAN77 へのバインディングである) POSIX.9。 POSIX.1-1996 では .BR clearenv () と .BR putenv (3) は採用されなかったが、 方針が変更され、この標準規格の以降の号 (B.4.6.1 を参照) では 採用されることになった。 しかし POSIX.1-2001 では .BR putenv (3) しか追加されず、 .BR clearenv () の追加は否決された。 .\"O .SH NOTES .SH 注意 .\"O Used in security-conscious applications. .\"O If it is unavailable .\"O the assignment この関数はセキュリティに考慮したアプリケーションで使われる。 この関数が使用できない場合は、 .nf environ = NULL; .fi .\"O will probably do. というように変数 environ を設定すればよい。 .LP .\"O The DG/UX and Tru64 man pages write: If .\"O .I environ .\"O has been modified by anything other than the .\"O .BR putenv (3), .\"O .BR getenv (3), .\"O or .\"O .BR clearenv () .\"O functions, then .\"O .BR clearenv () .\"O will return an error and the process environment will remain unchanged. DG/UX と Tru64 man ページには次のように記されている: .I environ が .BR putenv (3), .BR getenv (3), .BR clearenv () 関数以外で変更された場合、 .BR clearenv () はエラーを返し、プロセス環境は変更前のままにされる。 .\" .LP .\"O .\" HP-UX has a ENOMEM error return. .\" HP-UX には ENOMEM エラーがある。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR getenv (3), .BR putenv (3), .BR setenv (3), .BR unsetenv (3), .BR environ (7)