OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / release / man3 / lockf.3
1 .\" Copyright 1997 Nicolas Lichtmaier <nick@debian.org>
2 .\" Created Thu Aug  7 00:44:00 ART 1997
3 .\"
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" Added section stuff, aeb, 2002-04-22.
20 .\" Corrected include file, drepper, 2003-06-15.
21 .\"
22 .\" Japanese Version Copyright (c) 2000-2002 Yuichi SATO
23 .\"         all rights reserved.
24 .\" Translated Tue Jul 11 19:02:58 JST 2000
25 .\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
26 .\" Updated & Modified Mon Jul 15 02:10:29 JST 2002 by Yuichi SATO
27 .\" Updated 2010-04-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.24
28 .\"
29 .\"WORD:        apply           Å¬ÍÑ
30 .\"WORD:        remove          ²ò½ü
31 .\"WORD:        exclusive       ÇÓ¾
32 .\"WORD:        descriptor      ¥Ç¥£¥¹¥¯¥ê¥×¥¿
33 .\"WORD:        
34 .\"
35 .TH LOCKF 3 2009-07-25 "GNU" "Linux Programmer's Manual"
36 .SH Ì¾Á°
37 lockf \- ¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ËÂФ¹¤ë POSIX ¥í¥Ã¥¯¤ÎŬÍÑ¡¦¥Æ¥¹¥È¡¦²ò½ü¤ò¹Ô¤¦
38 .SH ½ñ¼°
39 .B #include <unistd.h>
40 .sp
41 .BI "int lockf(int " fd ", int " cmd ", off_t " len );
42 .sp
43 .in -4n
44 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
45 .RB ( feature_test_macros (7)
46 »²¾È):
47 .in
48 .sp
49 .BR lockf ():
50 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500
51 .SH ÀâÌÀ
52 ¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Î¥»¥¯¥·¥ç¥ó¤ËÂФ·¤Æ¡¢
53 POSIX ¥í¥Ã¥¯¤ÎŬÍÑ¡¦¥Æ¥¹¥È¡¦²ò½ü¤ò¤¹¤ë¡£
54 ¥Õ¥¡¥¤¥ë¤Ï
55 .I fd
56 ¤Ç»ØÄꤵ¤ì¤ë¡£
57 .I fd
58 ¤Ï½ñ¤­¹þ¤ß¤Î¤¿¤á¤Ë¥ª¡¼¥×¥ó¤·¤¿¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤¢¤ë¡£
59 ¥¢¥¯¥·¥ç¥ó¤Ï
60 .I cmd
61 ¤Ç»ØÄꤵ¤ì¤ë¡£
62 .I pos
63 ¤ò¸½ºß¤Î¥Õ¥¡¥¤¥ë°ÌÃ֤Ȥ¹¤ë¤È¡¢
64 .I len
65 ¤¬Àµ¤Î¾ì¹ç¡¢¥»¥¯¥·¥ç¥ó¤Ï¥Ð¥¤¥È°ÌÃÖ
66 .IR pos .. pos + len \-1
67 ¤È¤Ê¤ê¡¢
68 .I len
69 ¤¬Éé¤Î¾ì¹ç¡¢¥»¥¯¥·¥ç¥ó¤Ï¥Ð¥¤¥È°ÌÃÖ
70 .IR pos - len .. pos \-1
71 ¤È¤Ê¤ë¡£
72 .I len
73 ¤¬ 0 ¤Î¾ì¹ç¡¢¥»¥¯¥·¥ç¥ó¤Ï¸½ºß¤Î¥Õ¥¡¥¤¥ë°ÌÃÖ¤«¤é̵¸ÂÂç¤Þ¤Ç¤È¤Ê¤ë
74 (¤Ä¤Þ¤ê¸½ºß¤Î¡¢¤¢¤ë¤¤¤ÏÊѹ¹¤µ¤ì¤¿¾ì¹ç¤Ï¾­Íè¤Î¡¢¥Õ¥¡¥¤¥ë½ªÃ¼°ÌÃÖ¤Þ¤Ç)¡£
75 ¤É¤Î¾ì¹ç¤Ë¤ª¤¤¤Æ¤â¡¢¥»¥¯¥·¥ç¥ó¤Ï°ÊÁ°¤Î¥Õ¥¡¥¤¥ë½ªÃ¼¤è¤ê¤â³ÈÂ礵¤ì¤¦¤ë¡£
76 .LP
77 Linux ¤Ç¤Ï¡¢
78 .BR lockf ()
79 ¤Ïñ¤Ë
80 .BR fcntl (2)
81 ¤Î¥í¥Ã¥¯¤Ø¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ç¤¢¤ë¡£
82 ¿¤¯¤Î¾¤Î¥·¥¹¥Æ¥à¤Ç
83 .BR lockf ()
84 ¤Ï¤³¤Î¤è¤¦¤Ë¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¤¬¡¢
85 POSIX.1-2001 ¤Ç¤Ï
86 .BR lockf ()
87 ¤È
88 .BR fcntl (2)
89 ¤Î¥í¥Ã¥¯¤È¤Î´Ø·¸¤Ïµ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
90 ¤ª¤½¤é¤¯¡¢°Ü¿¢À­¤¬É¬Íפʥ¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤Ï¡¢
91 .BR lockf ()
92 ¤È
93 .BR fcntl (2)
94 ¤Î¥í¥Ã¥¯¤òº®¤¼¤Æ¸Æ¤Ó½Ð¤¹¤Î¤ÏÈò¤±¤ë¤Ù¤­¤Ç¤¢¤í¤¦¡£
95 .LP
96 Í­¸ú¤Ê¥ª¥×¥·¥ç¥ó¤ò°Ê²¼¤Ëµó¤²¤ë¡£
97 .TP
98 .B F_LOCK
99 ¥Õ¥¡¥¤¥ë¤Î»ØÄꤵ¤ì¤¿¥»¥¯¥·¥ç¥ó¤ËÇÓ¾¥í¥Ã¥¯¤òÀßÄꤹ¤ë¡£
100 ¤½¤Î¥»¥¯¥·¥ç¥ó (¤Î°ìÉô) ¤¬´û¤Ë¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤¿¾ì¹ç¡¢
101 Á°¤Î¥í¥Ã¥¯¤¬²ò½ü¤µ¤ì¤ë¤Þ¤Ç´Ø¿ô¤Î¸Æ¤Ó½Ð¤·¤¬¥Ö¥í¥Ã¥¯¤µ¤ì¤ë¡£
102 ¤³¤Î¥»¥¯¥·¥ç¥ó¤¬Á°¤Ë¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤ë¥»¥¯¥·¥ç¥ó¤È½Å¤Ê¤Ã¤¿¾ì¹ç¡¢
103 2 ¤Ä¤Î¥»¥¯¥·¥ç¥ó¤Ï·ë¹ç¤µ¤ì¤ë¡£
104 ¥í¥Ã¥¯¤òÊÝ»ý¤·¤Æ¤¤¤ë¥×¥í¥»¥¹¤¬¡¢
105 ¤½¤Î¥Õ¥¡¥¤¥ë¤Î¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò¥¯¥í¡¼¥º¤¹¤ë¤È¡¢
106 ¥Õ¥¡¥¤¥ë¥í¥Ã¥¯¤Ï²òÊü¤µ¤ì¤ë¡£
107 »Ò¥×¥í¥»¥¹¤Ï¥í¥Ã¥¯¤ò·Ñ¾µ¤·¤Ê¤¤¡£
108 .TP
109 .B F_TLOCK
110 .B F_LOCK
111 ¤ÈƱÍͤǤ¢¤ë¤¬¡¢¥Õ¥¡¥¤¥ë¤¬´û¤Ë¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
112 ´Ø¿ô¤Î¸Æ¤Ó½Ð¤·¤Ï¥Ö¥í¥Ã¥¯¤ò¹Ô¤ï¤º¤Ë¥¨¥é¡¼¤òÊÖ¤¹¡£
113 .TP
114 .B F_ULOCK
115 ¥Õ¥¡¥¤¥ë¤Î»ØÄꤵ¤ì¤¿¥»¥¯¥·¥ç¥ó¤Î¥í¥Ã¥¯¤ò²ò½ü¤¹¤ë¡£
116 ¤³¤ì¤Ë¤è¤ê¥í¥Ã¥¯¤µ¤ì¤¿¥»¥¯¥·¥ç¥ó¤¬ 2 ¤Ä¤Ëʬ³ä¤µ¤ì¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
117 .TP
118 .B F_TEST
119 ¼¡¤Î¤è¤¦¤Ë¥í¥Ã¥¯¤Î¥Æ¥¹¥È¤ò¤¹¤ë¡£
120 »ØÄꤵ¤ì¤¿¥»¥¯¥·¥ç¥ó¤¬¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤Ê¤¤¤«¡¢
121 ¤³¤Î¥×¥í¥»¥¹¤Ë¤è¤ê¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢0 ¤òÊÖ¤¹¡£
122 ¾¤Î¥×¥í¥»¥¹¤¬¥í¥Ã¥¯¤òÊÝ»ý¤·¤Æ¤¤¤ë¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
123 .I errno
124 ¤ò
125 .B EAGAIN
126 (¤¤¤¯¤Ä¤«¤Î¾¤Î¥·¥¹¥Æ¥à¤Ç¤Ï
127 .BR EACCES )
128 ¤ËÀßÄꤹ¤ë¡£
129 .SH ÊÖ¤êÃÍ
130 À®¸ù¤·¤¿¾ì¹ç¡¢0 ¤¬ÊÖ¤µ¤ì¤ë¡£
131 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤¬ÊÖ¤µ¤ì¡¢
132 .I errno
133 ¤¬¥¨¥é¡¼¤ËÂбþ¤·¤¿ÃͤËÀßÄꤵ¤ì¤ë¡£
134 .SH ¥¨¥é¡¼
135 .TP
136 .BR EACCES " ¤â¤·¤¯¤Ï " EAGAIN
137 ¥í¥Ã¥¯¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¡¢
138 .B F_TLOCK
139 ¤Þ¤¿¤Ï
140 .B F_TEST
141 ¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¡£
142 ¤Þ¤¿¤Ï¡¢¥Õ¥¡¥¤¥ë¤¬Â¾¤Î¥×¥í¥»¥¹¤Ë¤è¤ê¥á¥â¥ê¡¼¥Þ¥Ã¥×¤µ¤ì¤Æ¤ª¤ê¡¢
143 »ØÄꤵ¤ì¤¿Áàºî¤¬¶Ø»ß¤µ¤ì¤Æ¤¤¤ë¡£
144 .TP
145 .B EBADF
146 .I fd
147 ¤¬¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Î¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤Ï¤Ê¤¤¡£
148 .TP
149 .B EDEADLK
150 ¥³¥Þ¥ó¥É¤¬
151 .B T_LOCK
152 ¤Ç¤¢¤ê¡¢¤³¤Î¥í¥Ã¥¯Áàºî¤ò¹Ô¤¦¤È¥Ç¥Ã¥É¥í¥Ã¥¯¤¬È¯À¸¤·¤Æ¤·¤Þ¤¦¡£
153 .TP
154 .B EINVAL
155 .I fd
156 ¤Ë̵¸ú¤ÊÁàºî¤¬»ØÄꤵ¤ì¤¿¡£
157 .TP
158 .B ENOLCK
159 Èó¾ï¤Ë¿¤¯¤Î¥»¥°¥á¥ó¥È¥í¥Ã¥¯¤¬³«¤«¤ì¡¢¥í¥Ã¥¯¥Æ¡¼¥Ö¥ë¤¬°ìÇդǤ¢¤ë¡£
160 .SH ½àµò
161 SVr4, POSIX.1-2001.
162 .SH ´ØÏ¢¹àÌÜ
163 .BR fcntl (2),
164 .BR flock (2)
165 .br
166 ¥«¡¼¥Í¥ë¥½¡¼¥¹¤Î
167 .I Documentation/filesystems
168 ¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤¢¤ë
169 .I locks.txt
170 ¤È
171 .I mandatory-locking.txt
172 (°ÊÁ°¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¡¢¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï
173 .I Documentation
174 ¥Ç¥£¥ì¥¯¥È¥êľ²¼¤Ë¤¢¤ê¡¢
175 .I mandatory-locking.txt
176 ¤Ï
177 .I mandatory.txt
178 ¤È¤¤¤¦Ì¾Á°¤Ç¤¢¤Ã¤¿¡£)