OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / release / man2 / unlinkat.2
1 .\" This manpage is Copyright (C) 2006, Michael Kerrisk
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
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 .\" %%%LICENSE_END
24 .\"
25 .\"*******************************************************************
26 .\"
27 .\" This file was generated with po4a. Translate the source file.
28 .\"
29 .\"*******************************************************************
30 .\"
31 .\" Japanese Version Copyright (c) 2006 Yuichi SATO
32 .\"         all rights reserved.
33 .\" Translated 2006-08-24 by Yuichi SATO <ysato444@yahoo.co.jp>, LDP v2.39
34 .\"
35 .TH UNLINKAT 2 2012\-05\-04 Linux "Linux Programmer's Manual"
36 .SH 名前
37 unlinkat \- ディレクトリファイルディスクリプタから相対的な位置にあるディレクトリエントリを削除する
38 .SH 書式
39 .nf
40 \fB#include <fcntl.h> /* AT_* 定数の定義 */\fP
41 \fB#include <unistd.h>\fP
42 .sp
43 \fBint unlinkat(int \fP\fIdirfd\fP\fB, const char *\fP\fIpathname\fP\fB, int \fP\fIflags\fP\fB);\fP
44 .fi
45 .sp
46 .in -4n
47 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
48 .in
49 .sp
50 \fBunlinkat\fP():
51 .PD 0
52 .ad l
53 .RS 4
54 .TP  4
55 glibc 2.10 以降:
56 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
57 .TP 
58 glibc 2.10 より前:
59 _ATFILE_SOURCE
60 .RE
61 .ad
62 .PD
63 .SH 説明
64 \fBunlinkat\fP()  システムコールは、この man ページで説明している違いがある以外は、 (\fIflags\fP に
65 \fBAT_REMOVEDIR\fP フラグが含まれるか否かにより)  \fBunlink\fP(2)  または \fBrmdir\fP(2)
66 と全く同じように動作する。
67
68 \fIpathname\fP で指定されるパス名が相対パス名である場合、 ファイルディスクリプタ \fIdirfd\fP
69 で参照されるディレクトリからの相対パス名として解釈される (\fBunlink\fP(2)  または \fBrmdir\fP(2)
70 では、相対パスは呼び出し元プロセスの カレントワーキングディレクトリからの相対パスとなる)。
71
72 \fIpathname\fP で指定されるパス名が相対パス名であり、かつ \fIdirfd\fP が特別な値 \fBAT_FDCWD\fP である場合、
73 \fIpathname\fP は (\fBunlink\fP(2)  または \fBrmdir\fP(2)  と同じように) 呼び出し元プロセスの
74 カレントワーキングディレクトリからの相対パス名として解釈される。
75
76 \fIpathname\fP で指定されるパス名が絶対パス名である場合、 \fIdirfd\fP は無視される。
77
78 \fIflags\fP はビットマスクであり、0 または \fBunlinkat\fP()  の操作を制御するフラグ値の OR を指定できる。 現在のところ 1
79 つのフラグだけが定義されている:
80 .TP 
81 \fBAT_REMOVEDIR\fP
82 デフォルトでは、 \fBunlinkat\fP()  は \fIpathname\fP に対して \fBunlink\fP(2)  と同じ操作を行う。
83 \fBAT_REMOVEDIR\fP フラグが指定されると、 \fIpathname\fP に対して \fBrmdir\fP(2)  と同じ操作を行う。
84 .SH 返り値
85 成功した場合、 \fBunlinkat\fP()  は 0 を返す。 エラーの場合、\-1 が返されて、 \fIerrno\fP にはエラーを示す値が設定される。
86 .SH エラー
87 \fBunlink\fP(2)  または \fBrmdir\fP(2)  と同じエラーが \fBunlinkat\fP()  でも起こる。 \fBunlinkat\fP()
88 では、その他に以下のエラーが起こる:
89 .TP 
90 \fBEBADF\fP
91 \fIdirfd\fP が有効なファイルディスクリプタでない。
92 .TP 
93 \fBEINVAL\fP
94 \fIflags\fP に不正なフラグ値が指定された。
95 .TP 
96 \fBENOTDIR\fP
97 \fIpathname\fP が相対パスで、かつ \fIdirfd\fP がディレクトリ以外のファイルを参照するファイルディスクリプタである。
98 .SH バージョン
99 \fBunlinkat\fP()  は Linux カーネル 2.6.16 で追加された。
100 ライブラリによるサポートは glibc バージョン 2.4 で追加された。
101 .SH 準拠
102 POSIX.1\-2008.  Solaris には、これと同じようなシステムコールが存在する。
103 .SH 注意
104 \fBunlinkat\fP()  が必要な理由については、 \fBopenat\fP(2)  を参照すること。
105 .SH 関連項目
106 \fBopenat\fP(2), \fBrmdir\fP(2), \fBunlink\fP(2), \fBpath_resolution\fP(7)
107 .SH この文書について
108 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
109 である。プロジェクトの説明とバグ報告に関する情報は
110 http://www.kernel.org/doc/man\-pages/ に書かれている。