.\" Copyright 2001 John Levon .\" .\" %%%LICENSE_START(VERBATIM) .\" 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. .\" %%%LICENSE_END .\" .\" Additions, aeb, 2001-10-17. .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" 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 2014\-08\-19 Linux "Linux Programmer's Manual" .SH 名前 clearenv \- 環境 (environment) をクリアする .SH 書式 .nf \fB#include \fP .sp \fBint clearenv(void);\fP .fi .sp .in -4n glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp \fBclearenv\fP(): _SVID_SOURCE || _BSD_SOURCE .SH 説明 \fBclearenv\fP() 関数は、名前と値が組になった全ての環境をクリアする。 さらに外部変数 \fIenviron\fP の値を NULL にする。 .SH 返り値 .\" Most versions of UNIX return -1 on error, or do not even have errors. .\" Glibc info and the Watcom C library document "a nonzero value". \fBclearenv\fP() 関数は、成功した場合は 0 を返し、 失敗した場合は 0 以外を返す。 .SH バージョン glibc 2.0 以降で利用可能。 .SH 準拠 (DG/UX, HP\-UX, QNX, などの) 多くの UNIX 系 OS。 (FORTRAN77 へのバインディングである) POSIX.9。 POSIX.1\-1996 では \fBclearenv\fP() と \fBputenv\fP(3) は採用されなかったが、 方針が変更され、この標準規格の以降の号 (B.4.6.1 を参照) では 採用されることになった。 しかし POSIX.1\-2001 では \fBputenv\fP(3) だけが追加され、 \fBclearenv\fP() の追加は否決された。 .SH 注意 この関数はセキュリティに考慮したアプリケーションで使われる。 この関数が使用できない場合は、 .nf environ = NULL; .fi というように変数 environ を設定すればよい。 .LP .\" .LP .\" HP-UX has a ENOMEM error return. DG/UX と Tru64 man ページには次のように記されている: \fIenviron\fP が \fBputenv\fP(3), \fBgetenv\fP(3), \fBclearenv\fP() 関数以外で変更された場合、 \fBclearenv\fP() はエラーを返し、プロセス環境は変更前のままにされる。 .SH 関連項目 \fBgetenv\fP(3), \fBputenv\fP(3), \fBsetenv\fP(3), \fBunsetenv\fP(3), \fBenviron\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。