OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man3 / fexecve.3
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (c) 2006, Michael Kerrisk
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\"*******************************************************************
26 .\"
27 .\" This file was generated with po4a. Translate the source file.
28 .\"
29 .\"*******************************************************************
30 .TH FEXECVE 3 2010\-09\-15 Linux "Linux Programmer's Manual"
31 .SH 名前
32 fexecve \- ファイルディスクリプタで指定されたプログラムを実行する
33 .SH 書式
34 .nf
35 \fB#include <unistd.h>\fP
36 .sp
37 \fBint fexecve(int \fP\fIfd\fP\fB, char *const \fP\fIargv\fP\fB[], char *const \fP\fIenvp\fP\fB[]);\fP
38 .fi
39 .sp
40 .in -4n
41 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
42 .in
43 .sp
44 \fBfexecve\fP():
45 .PD 0
46 .ad l
47 .RS 4
48 .TP  4
49 glibc 2.10 以降:
50 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
51 .TP 
52 glibc 2.10 より前:
53 _GNU_SOURCE
54 .RE
55 .ad
56 .PD
57 .SH 説明
58 .\" POSIX.1-2008 specifies the O_EXEC flag for open as an alternative,
59 .\" but Linux doesn't support this flag yet.
60 \fBfexecve\fP()  は \fBexecve\fP(2)  と同じ作業を行う。違うのは、 実行するファイルを、パス名ではなく、 ファイルディスクリプタ
61 \fIfd\fP を用いて指定する点である。 ファイルディスクリプタ \fIfd\fP は、読み込み専用でオープンされていなければならず、
62 呼び出し元はファイルディスクリプタが参照するファイルに対する 実行許可を持っていなければならない。
63 .SH 返り値
64 \fBfexecve\fP()  は呼び出しに成功した場合、戻ることはない。 エラーの場合、返り値として \-1 が返され、 \fIerrno\fP
65 が適切に設定される。
66 .SH エラー
67 エラーは \fBexecve\fP(2)  と同じだが、以下のエラーが追加になっている:
68 .TP 
69 \fBEINVAL\fP
70 \fIfd\fP が有効なファイルディスクリプタでない。または \fIargv\fP が NULL である。または \fIenvp\fP が NULL である。
71 .TP 
72 \fBENOSYS\fP
73 \fI/proc\fP ファイルシステムにアクセスできなかった。
74 .SH バージョン
75 \fBfexecve\fP()  は glibc 2.3.2 以降で実装されている。
76 .SH 準拠
77 POSIX.1\-2008.  この関数は POSIX.1\-2001 では規定されておらず、 他のシステムで広く利用できるわけではない。
78 .SH 注意
79 Linux では、 \fBfexecve\fP()  は \fBproc\fP(5)  ファイルシステムを使って実装されている。
80 そのため、この関数を呼び出す時点では \fI/proc\fP がマウントされて利用可能となっている必要がある。
81 .SH 関連項目
82 \fBexecve\fP(2)