OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man3 / getenv.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright (C) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
3 .\"
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 .\"
24 .\" References consulted:
25 .\"     Linux libc source code
26 .\"     Lewine's "POSIX Programmer's Guide" (O'Reilly & Associates, 1991)
27 .\"     386BSD man pages
28 .\" Modified Sat Jul 24 19:30:29 1993 by Rik Faith (faith@cs.unc.edu)
29 .\" Modified Fri Feb 14 21:47:50 1997 by Andries Brouwer (aeb@cwi.nl)
30 .\"
31 .\"*******************************************************************
32 .\"
33 .\" This file was generated with po4a. Translate the source file.
34 .\"
35 .\"*******************************************************************
36 .TH GETENV 3 2008\-03\-17 GNU "Linux Programmer's Manual"
37 .SH 名前
38 getenv \- 環境変数を得る
39 .SH 書式
40 .nf
41 \fB#include <stdlib.h>\fP
42 .sp
43 \fBchar *getenv(const char *\fP\fIname\fP\fB);\fP
44 .fi
45 .SH 説明
46 関数 \fBgetenv\fP()  は、環境リストから名前が \fIname\fP の環境変数を検索し、対応する \fIvalue\fP 文字列へのポインタを返す。
47 .SH 返り値
48 関数 \fBgetenv\fP()  は、環境における値 value へのポインタを返す。 \fIname\fP にマッチする環境変数が存在しないときには NULL
49 を返す。
50 .SH 準拠
51 SVr4, POSIX.1\-2001, 4.3BSD, C89, C99.
52 .SH 注意
53 環境リストの文字列は \fIname=value\fP という形式をしている。
54
55 通常の実装では、 \fBgetenv\fP()  は環境リスト内の文字列へのポインタを返す。 呼び出し元はこの文字列を変更しないように注意しなければならない。
56 この文字列を変更すると、そのプロセスの環境を変化させることになるからである。
57
58 \fBgetenv\fP()  の実装はリエントラント (再入可能) であることを要求されていない。 \fBgetenv\fP()
59 の返り値により参照される文字列は静的に割り当てられてもよく、 文字列の内容は後続の \fBgetenv\fP(), \fBputenv\fP(3),
60 \fBsetenv\fP(3), \fBunsetenv\fP(3)  の呼び出しにより変更されることがある。
61 .SH 関連項目
62 \fBclearenv\fP(3), \fBputenv\fP(3), \fBsetenv\fP(3), \fBunsetenv\fP(3), \fBenviron\fP(7)