OSDN Git Service

1ee6aa11dca406e40a60305a00ea5e8509cf5b9d
[linuxjm/LDP_man-pages.git] / draft / man2 / flock.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) and
4 .\" and Copyright 2002 Michael Kerrisk
5 .\"
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\"
26 .\" Modified Fri Jan 31 16:26:07 1997 by Eric S. Raymond <esr@thyrsus.com>
27 .\" Modified Fri Dec 11 17:57:27 1998 by Jamie Lokier <jamie@imbolc.ucc.ie>
28 .\" Modified 24 Apr 2002 by Michael Kerrisk <mtk.manpages@gmail.com>
29 .\"     Substantial rewrites and additions
30 .\" 2005-05-10 mtk, noted that lock conversions are not atomic.
31 .\"
32 .\" Japanese Version Copyright (c) 1996 Takeshi Ueno
33 .\"         all rights reserved.
34 .\" Translated 1996-07-03, Takeshi Ueno <tueno@vio.co.jp>
35 .\" Modified 1997-12-14, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
36 .\" Modified 1999-08-14, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
37 .\" Modified 2002-09-24, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
38 .\" Modified 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
39 .\" Updated 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
40 .\"
41 .TH FLOCK 2 2009-07-25 "Linux" "Linux Programmer's Manual"
42 .\"O .SH NAME
43 .\"O flock \- apply or remove an advisory lock on an open file
44 .SH Ì¾Á°
45 flock \- ¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ËÂФ¹¤ë¥¢¥É¥Ð¥¤¥¶¥ê¡¦¥í¥Ã¥¯¤ÎŬÍÑ¡¢²ò½ü¤ò¹Ô¤¦
46 .\"O .SH SYNOPSIS
47 .SH ½ñ¼°
48 .B #include <sys/file.h>
49 .sp
50 .BI "int flock(int " fd ", int " operation );
51 .\"O .SH DESCRIPTION
52 .SH ÀâÌÀ
53 .\"O Apply or remove an advisory lock on the open file specified by
54 .\"O .IR fd .
55 .\"O The argument
56 .\"O .I operation
57 .\"O is one of the following:
58 ¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Ë¥¢¥É¥Ð¥¤¥¶¥ê¡¦¥í¥Ã¥¯ (advisory lock) ¤ÎŬÍÑ
59 ¤ä²ò½ü¤ò¹Ô¤¦¡£
60 ¥Õ¥¡¥¤¥ë¤Ï
61 .I fd
62 ¤Ç»ØÄꤹ¤ë¡£°ú¤­¿ô
63 .I operation
64 ¤Ë¤Ï°Ê²¼¤Î¤¤¤º¤ì¤«°ì¤Ä¤ò»ØÄꤹ¤ë:
65 .RS 4
66 .TP 9
67 .B LOCK_SH
68 .\"O Place a shared lock.
69 .\"O More than one process may hold a shared lock for a given file
70 .\"O at a given time.
71 ¶¦Í­¥í¥Ã¥¯¤òŬÍѤ¹¤ë¡£ »ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¡¢
72 °ì¤Ä°Ê¾å¤Î¥×¥í¥»¥¹¤¬Æ±»þ¤Ë¶¦Í­¥í¥Ã¥¯¤òÊÝ»ý¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
73 .TP
74 .B LOCK_EX
75 .\"O Place an exclusive lock.
76 .\"O Only one process may hold an exclusive lock for a given
77 .\"O file at a given time.
78 ÇÓ¾¥í¥Ã¥¯¤òŬÍѤ¹¤ë¡£  »ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¡¢
79 ¤¿¤À°ì¤Ä¤Î¥×¥í¥»¥¹¤À¤±¤¬Æ±»þ¤ËÇÓ¾¥í¥Ã¥¯¤òÊÝ»ý¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
80 .TP
81 .B LOCK_UN
82 .\"O Remove an existing lock held by this process.
83 ¤³¤Î¥×¥í¥»¥¹¤¬ÊÝ»ý¤·¤Æ¤¤¤ë´û¸¤Î¥í¥Ã¥¯¤ò²ò½ü¤¹¤ë¡£
84 .RE
85 .PP
86 .\"O A call to
87 .\"O .BR flock ()
88 .\"O may block if an incompatible lock is held by another process.
89 .\"O To make a nonblocking request, include
90 .\"O .B LOCK_NB
91 .\"O (by
92 .\"O .IR OR ing)
93 .\"O with any of the above operations.
94 .BR flock ()
95 ¤ò¸Æ¤Ó½Ð¤·¤¿¤È¤­¤Ë¡¢»ØÄꤷ¤¿¥í¥Ã¥¯¼ïÊ̤Ȱۤʤë¥í¥Ã¥¯¤¬ÊÌ¥×¥í¥»¥¹¤Ë¤è¤Ã¤Æ
96 ÊÝ»ý¤µ¤ì¤Æ¤¤¤ë¤È¡¢
97 .BR flock ()
98 ¤ÏÄä»ß (block) ¤µ¤ì¤ë¤³¤È¤¬¤¢¤ë¡£
99 ÈóÄä»ß (nonblocking) ¥¿¥¤¥×¤ÎÍ×µá¤ò¹Ô¤¦¤¿¤á¤Ë¤Ï¡¢
100 ¾åµ­¤ÎÁàºî (operation) ¤Ë
101 .B LOCK_NB
102 ¤òÏÀÍýϤηÁ¤Ç»ØÄꤹ¤ë¡£
103
104 .\"O A single file may not simultaneously have both shared and exclusive locks.
105 °ì¤Ä¤Î¥Õ¥¡¥¤¥ë¤Ë¶¦Í­¥í¥Ã¥¯¤ÈÇÓ¾¥í¥Ã¥¯¤òƱ»þ¤ËÀßÄꤹ¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡£
106
107 .\"O Locks created by
108 .\"O .BR flock ()
109 .\"O are associated with an open file table entry.
110 .\"O This means that duplicate file descriptors (created by, for example,
111 .\"O .BR fork (2)
112 .\"O or
113 .\"O .BR dup (2))
114 .\"O refer to the same lock, and this lock may be modified
115 .\"O or released using any of these descriptors.
116 .BR flock ()
117 ¤Ë¤è¤Ã¤Æºî¤é¤ì¤ë¥í¥Ã¥¯¤Ï¡¢
118 ¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Î¥Æ¡¼¥Ö¥ë¡¦¥¨¥ó¥È¥ê¤È´ØÏ¢ÉÕ¤±¤é¤ì¤ë¡£
119 ¤·¤¿¤¬¤Ã¤Æ¡¢¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ÎÊ£À½
120 .RB ( fork (2)
121 ¤ä
122 .BR dup (2)
123 ¤Ê¤É¤Ë¤è¤êºîÀ®¤µ¤ì¤ë) ¤ÏƱ¤¸¥í¥Ã¥¯¤ò»²¾È¤·¡¢
124 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Î¤É¤ì¤ò»È¤Ã¤Æ¤â
125 ¤³¤Î¥í¥Ã¥¯¤òÊѹ¹¤·¤¿¤ê²òÊü¤·¤¿¤ê¤Ç¤­¤ë¡£
126 .\"O Furthermore, the lock is released either by an explicit
127 .\"O .B LOCK_UN
128 .\"O operation on any of these duplicate descriptors, or when all
129 .\"O such descriptors have been closed.
130 ¤Þ¤¿¡¢¥í¥Ã¥¯¤Î²òÊü¤Ï¡¢
131 ¾åµ­¤ÎÊ£¿ô¤Î¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Î¤¤¤º¤ì¤«¤ËÂФ·¤Æ
132 ÌÀ¼¨Åª¤Ë
133 .B LOCK_UN
134 Áàºî¤ò»Ø¼¨¤·¤¿¾ì¹ç¤«¡¢¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬¤¹¤Ù¤Æ
135 ÊĤ¸¤é¤ì¤¿¾ì¹ç¤Ë¹Ô¤ï¤ì¤ë¡£
136
137 .\"O If a process uses
138 .\"O .BR open (2)
139 .\"O (or similar) to obtain more than one descriptor for the same file,
140 .\"O these descriptors are treated independently by
141 .\"O .BR flock ().
142 .\"O An attempt to lock the file using one of these file descriptors
143 .\"O may be denied by a lock that the calling process has
144 .\"O already placed via another descriptor.
145 ¤¢¤ë¥×¥í¥»¥¹¤¬
146 .BR open (2)
147 (¤â¤·¤¯¤ÏƱÍͤÎÊýË¡) ¤ò»È¤Ã¤ÆƱ¤¸¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ
148 Ê£¿ô¤Î¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò¼èÆÀ¤·¤¿¾ì¹ç¡¢
149 .BR flock ()
150 ¤Ï¤³¤ì¤éÊ£¿ô¤Î¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò³Æ¡¹ÆÈΩ¤Î¤â¤Î¤È¤·¤Æ°·¤¦¡£
151 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Î°ì¤Ä¤ò»È¤Ã¤Æ¥Õ¥¡¥¤¥ë¤ò¥í¥Ã¥¯¤·¤è¤¦¤È
152 ¤·¤¿ºÝ¡¢¤½¤Î¥í¥Ã¥¯Í×µá¤Ï¡¢¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤¬¤½¤Î¥Õ¥¡¥¤¥ë¤ÎÊ̤Î
153 ¥Ç¥£¥¹¥¯¥ê¥×¥¿·Ðͳ¤Ç¤¹¤Ç¤ËÀßÄꤷ¤Æ¤¤¤ë¥í¥Ã¥¯¤Ë¤è¤Ã¤ÆµñÈݤµ¤ì¤ë¾ì¹ç¤¬¤¢¤ë¡£
154
155 .\"O A process may only hold one type of lock (shared or exclusive)
156 .\"O on a file.
157 .\"O Subsequent
158 .\"O .BR flock ()
159 .\"O calls on an already locked file will convert an existing lock to the new
160 .\"O lock mode.
161 °ì¤Ä¤Î¥×¥í¥»¥¹¤Ï¡¢°ì¤Ä¤Î¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ (¶¦Í­¥í¥Ã¥¯¤ÈÇÓ¾¥í¥Ã¥¯¤Î¤¦¤Á)
162 ¤¤¤º¤ì¤«°ì¼ïÎà¤Î¥í¥Ã¥¯¤·¤«ÀßÄê¤Ç¤­¤Ê¤¤¡£
163 ´û¤Ë¥í¥Ã¥¯¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ
164 .BR flock ()
165 ¤ò¸Æ¤Ó½Ð¤¹¤È¡¢´û¸¤Î¥í¥Ã¥¯¤ò¿·¤·¤¤¥í¥Ã¥¯¥â¡¼¥É¤ËÊѹ¹¤¹¤ë¤³¤È¤Ë¤Ê¤ë¡£
166
167 .\"O Locks created by
168 .\"O .BR flock ()
169 .\"O are preserved across an
170 .\"O .BR execve (2).
171 .BR flock ()
172 ¤Ë¤è¤êºîÀ®¤µ¤ì¤¿¥í¥Ã¥¯¤Ï
173 .BR execve (2)
174 ¤ÎÁ°¸å¤ÇÊݸ¤µ¤ì¤ë¡£
175
176 .\"O A shared or exclusive lock can be placed on a file regardless of the
177 .\"O mode in which the file was opened.
178 ¶¦Í­¥í¥Ã¥¯¤âÇÓ¾¥í¥Ã¥¯¤â¡¢¥Õ¥¡¥¤¥ë¤¬¤É¤Î¥â¡¼¥É¤Ç¥ª¡¼¥×¥ó¤µ¤ì¤¿¤«¤Ë
179 ´Ø·¸¤Ê¤¯Å¬ÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
180 .\"O .SH "RETURN VALUE"
181 .SH ÊÖ¤êÃÍ
182 .\"O On success, zero is returned.
183 .\"O On error, \-1 is returned, and
184 .\"O .I errno
185 .\"O is set appropriately.
186 À®¸ù¤Î¾ì¹ç¡¢0 ¤¬ÊÖ¤µ¤ì¤ë¡£¥¨¥é¡¼¤Î¾ì¹ç¤Ï¡¢\-1 ¤¬ÊÖ¤µ¤ì¡¢
187 .I errno
188 ¤ËŬÀÚ¤ÊÃͤ¬ÀßÄꤵ¤ì¤ë¡£
189 .\"O .SH ERRORS
190 .SH ¥¨¥é¡¼
191 .TP
192 .B EBADF
193 .\"O .I fd
194 .\"O is not an open file descriptor.
195 .I fd
196 ¤¬¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤Ï¤Ê¤¤¡£
197 .TP
198 .B EINTR
199 .\"O While waiting to acquire a lock, the call was interrupted by
200 .\"O delivery of a signal caught by a handler; see
201 .\"O .BR signal (7).
202 ¥í¥Ã¥¯¤Î³ÍÆÀ¤òÂԤäƤ¤¤ë´Ö¤Ë¡¢¥Ï¥ó¥É¥é¤Ë¤è¤êÊ᪤µ¤ì¤¿¥·¥°¥Ê¥ë¤ò
203 ¼õ¿®¤·¡¢
204 .BR flock ()
205 ¤¬ÃæÃǤµ¤ì¤¿¡£
206 .BR signal (7)
207 »²¾È¡£
208 .TP
209 .B EINVAL
210 .\"O .I operation
211 .\"O is invalid.
212 .I oepration
213 ¤¬Ìµ¸ú¤Ç¤¢¤ë¡£
214 .TP
215 .B ENOLCK
216 .\"O The kernel ran out of memory for allocating lock records.
217 ¥í¥Ã¥¯¡¦¥ì¥³¡¼¥É¤ò³ä¤êÅö¤Æ¤ë¤¿¤á¤Î¥á¥â¥ê¤¬ÉÔ­¤·¤Æ¤¤¤ë¡£
218 .TP
219 .B EWOULDBLOCK
220 .\"O The file is locked and the
221 .\"O .B LOCK_NB
222 .\"O flag was selected.
223 »ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¤¬¥í¥Ã¥¯¤µ¤ì¤Æ¤ª¤ê¡¢
224 .B LOCK_NB
225 ¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¡£
226 .\"O .SH "CONFORMING TO"
227 .SH ½àµò
228 .\"O 4.4BSD (the
229 .\"O .BR flock ()
230 .\"O call first appeared in 4.2BSD).
231 4.4BSD
232 .RB ( flock ()
233 ¥³¡¼¥ë¤Ï 4.2BSD ¤ÇºÇ½é¤ËÅо줷¤¿)¡£
234 .\"O A version of
235 .\"O .BR flock (),
236 .\"O possibly implemented in terms of
237 .\"O .BR fcntl (2),
238 .\"O appears on most Unix systems.
239 .BR fcntl (2)
240 ¤Ç¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤Ê¤É¤ò´Þ¤á¤ë¤È¡¢
241 .BR flock ()
242 ¤Îµ¡Ç½¤Ï¤Û¤È¤ó¤É¤Î Unix ¥·¥¹¥Æ¥à¤Ç¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
243 .\"O .SH NOTES
244 .SH Ãí°Õ
245 .\"O .BR flock ()
246 .\"O does not lock files over NFS.
247 .\"O Use
248 .\"O .BR fcntl (2)
249 .\"O instead: that does work over NFS, given a sufficiently recent version of
250 .\"O Linux and a server which supports locking.
251 .BR flock ()
252 ¤Ï NFS ¾å¤Î¥Õ¥¡¥¤¥ë¤Î¥í¥Ã¥¯¤ò¤·¤Ê¤¤¡£Âå¤ï¤ê¤Ë
253 .BR fcntl (2)
254 ¤ò»ÈÍѤ¹¤ë¤³¤È¡£¤³¤ì¤Ë¤è¤ê¡¢½½Ê¬¤Ë¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Î Linux ¤È¡¢¥í¥Ã¥¯µ¡Ç½¤ò
255 ¥µ¥Ý¡¼¥È¤·¤¿ NFS ¥µ¡¼¥Ð¤ò»ÈÍѤ¹¤ë¤³¤È¤Ë¤è¤ê¡¢NFS ¾å¤Ç¥í¥Ã¥¯¤¬¤Ç¤­¤ë¡£
256 .PP
257 .\"O Since kernel 2.0,
258 .\"O .BR flock ()
259 .\"O is implemented as a system call in its own right rather
260 .\"O than being emulated in the GNU C library as a call to
261 .\"O .BR fcntl (2).
262 kernel 2.0 °Ê¹ß¤Ç¤Ï¡¢
263 .BR flock ()
264 ¤Ï¡¢GNU C ¥é¥¤¥Ö¥é¥ê¤Ç¤Î
265 .BR fcntl (2)
266 ¤ò¸Æ¤Ó½Ð¤·¤Æ¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤Ç¤Ï¤Ê¤¯¡¢
267 ¤½¤ì¼«ÂΤ¬¥·¥¹¥Æ¥à¥³¡¼¥ë¤È¤·¤Æ¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
268 .\"O This yields true BSD semantics:
269 .\"O there is no interaction between the types of lock
270 .\"O placed by
271 .\"O .BR flock ()
272 .\"O and
273 .\"O .BR fcntl (2),
274 .\"O and
275 .\"O .BR flock ()
276 .\"O does not detect deadlock.
277 ¤³¤ì¤Ë¤è¤êÀµ¿¿ÀµÌäΠBSD ¤Ç¤ÎÆ°ºî¤¬Ã£À®¤µ¤ì¤ë:
278 .BR flock ()
279 ¤È
280 .BR fcntl (2)
281 ¤ÇŬÍѤµ¤ì¤ë¥í¥Ã¥¯¤Î¼ïÊ̤ˤÏÁê¸ßºîÍѤ¬¤Ê¤¯¤Ê¤ê¡¢
282 .BR flock ()
283 ¤¬¥Ç¥Ã¥É¥í¥Ã¥¯¤ò¸¡½Ð¤·¤Ê¤¯¤Ê¤ë¡£
284 .PP
285 .\"O .BR flock ()
286 .\"O places advisory locks only; given suitable permissions on a file,
287 .\"O a process is free to ignore the use of
288 .\"O .BR flock ()
289 .\"O and perform I/O on the file.
290 .BR flock ()
291 ¥¢¥É¥Ð¥¤¥¶¥ê¡¦¥í¥Ã¥¯¤À¤±¤òŬÍѤ¹¤ë¡£¤·¤¿¤¬¤Ã¤Æ¡¢¥Õ¥¡¥¤¥ë¤ËŬÀڤʥ¢¥¯¥»¥¹¸¢¤ò
292 ÉÕÍ¿¤·¤Æ¤¤¤ì¤Ð¡¢¥×¥í¥»¥¹¤Ï
293 .BR flock ()
294 ¤Î»ÈÍѤË̵»ë¤·¤Æ¡¢¥Õ¥¡¥¤¥ë¤Ø¤ÎÆþ½ÐÎϤò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤ë¡£
295 .PP
296 .\"O .BR flock ()
297 .\"O and
298 .\"O .BR fcntl (2)
299 .\"O locks have different semantics with respect to forked processes and
300 .\"O .BR dup (2).
301 .BR flock ()
302 ¤È
303 .BR fcntl (2)
304 ¤Ï fork ¤µ¤ì¤¿¥×¥í¥»¥¹¤È
305 .BR dup (2)
306 ¤Ç°ã¤Ã¤¿Æ°ºî¤ò¤¹¤ë¡£
307 .\"O On systems that implement
308 .\"O .BR flock ()
309 .\"O using
310 .\"O .BR fcntl (2),
311 .\"O the semantics of
312 .\"O .BR flock ()
313 .\"O will be different from those described in this manual page.
314 .BR flock ()
315 ¤ò
316 .BR fcntl (2)
317 ¤ò»È¤Ã¤Æ¼ÂÁõ¤·¤Æ¤¤¤ë¥·¥¹¥Æ¥à¤Ç¤Ï¡¢
318 .BR flock ()
319 ¤ÎÆ°ºî¤Ï¤³¤Î¥Þ¥Ë¥å¥¢¥ë¡¦¥Ú¡¼¥¸¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤È¤Ï°ã¤¦¤À¤í¤¦¡£
320 .PP
321 .\"O Converting a lock
322 .\"O (shared to exclusive, or vice versa) is not guaranteed to be atomic:
323 .\"O the existing lock is first removed, and then a new lock is established.
324 .\"O Between these two steps,
325 .\"O a pending lock request by another process may be granted,
326 .\"O with the result that the conversion either blocks, or fails if
327 .\"O .B LOCK_NB
328 .\"O was specified.
329 .\"O (This is the original BSD behavior,
330 .\"O and occurs on many other implementations.)
331 .\"O .\" Kernel 2.5.21 changed things a little: during lock conversion
332 .\"O .\" it is now the highest priority process that will get the lock -- mtk
333 ¥í¥Ã¥¯¤ÎÊÑ´¹ (¶¦Í­¥í¥Ã¥¯¤«¤éÇÓ¾¥í¥Ã¥¯¤Ø¡¢¤â¤·¤¯¤Ï¤½¤ÎÈ¿ÂÐ) ¤¬¥¢¥È¥ß¥Ã¥¯¤Ë
334 ¹Ô¤ï¤ì¤ë¤³¤È¤ÏÊݾڤµ¤ì¤Æ¤¤¤Ê¤¤: ´û¸¤Î¥í¥Ã¥¯¤¬¤Þ¤ººï½ü¤µ¤ì¡¢¤½¤ì¤«¤é¿·¤·¤¤
335 ¥í¥Ã¥¯¤¬ÀßÄꤵ¤ì¤ë¡£¤³¤Î 2¤Ä¤Î¥¹¥Æ¥Ã¥×¤Î´Ö¤Ë¡¢Â¾¤Î¥×¥í¥»¥¹¤«¤é¤Î½èÍýÂÔ¤Á¤Î
336 ¥í¥Ã¥¯Í׵᤬ǧ¤á¤é¤ì¤ë¤«¤â¤·¤ì¤º¡¢·ë²Ì¤È¤·¤ÆÊÑ´¹¤ÏÄä»ß (block) ¤·¤¿¤ê¡¢
337 .RB ( LOCK_NB
338 ¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¤Ë¤Ï) ¼ºÇÔ¤·¤¿¤ê¤¹¤ë¡£
339 (¤³¤ì¤Ï¸µ¡¹¤Î BSD ¤ÎÆ°ºî¤Ç¤¢¤ê¡¢Â¿¤¯¤Î¾¤Î¼ÂÁõ¤Ç¤âµ¯¤³¤ë¡£)
340 .\" ¥«¡¼¥Í¥ë 2.5.21 ¤Ç¾¯¤·Æ°ºî¤¬Êѹ¹¤µ¤ì¤¿: ¥í¥Ã¥¯ÊÑ´¹¤ÎºÇÃæ¤Ï
341 .\" ¤½¤Î¥í¥Ã¥¯¤ò¹Ô¤ª¤¦¤È¤·¤Æ¤¤¤ë¥×¥í¥»¥¹¤¬ºÇ¹âÍ¥Àè¤È¤Ê¤ë -- mtk
342 .\"O .SH "SEE ALSO"
343 .SH ´ØÏ¢¹àÌÜ
344 .BR close (2),
345 .BR dup (2),
346 .BR execve (2),
347 .BR fcntl (2),
348 .BR fork (2),
349 .BR open (2),
350 .BR lockf (3)
351
352 .\"O See also
353 .\"O .I Documentation/filesystem/locks.txt
354 .\"O in the kernel source
355 .\"O .RI ( Documentation/locks.txt
356 .\"O in older kernels).
357 ¥«¡¼¥Í¥ë¥½¡¼¥¹Æâ¤Î
358 .I Documentation/filesystem/locks.txt
359 (°ÊÁ°¤Î¥«¡¼¥Í¥ë¤Ç¤Ï
360 .IR Documentation/locks.txt )
361 ¤â»²¾È¤Î¤³¤È¡£