#, fuzzy msgid "" msgstr "" "Project-Id-Version: man-pages-l10n VERSION\n" "POT-Creation-Date: 2014-07-17 17:53+0900\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: man-pages/man2/flock.2:35 #, no-wrap msgid "FLOCK" msgstr "" #. type: TH #: man-pages/man2/flock.2:35 #, no-wrap msgid "2014-06-13" msgstr "" #. type: TH #: man-pages/man2/flock.2:35 #, no-wrap msgid "Linux" msgstr "" #. type: TH #: man-pages/man2/flock.2:35 #, no-wrap msgid "Linux Programmer's Manual" msgstr "" #. type: SH #: man-pages/man2/flock.2:36 #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:38 msgid "flock - apply or remove an advisory lock on an open file" msgstr "" #. type: SH #: man-pages/man2/flock.2:38 #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:40 msgid "B<#include Esys/file.hE>" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:42 msgid "BIB<, int >IB<);>" msgstr "" #. type: SH #: man-pages/man2/flock.2:42 #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:48 msgid "" "Apply or remove an advisory lock on the open file specified by I. The " "argument I is one of the following:" msgstr "" #. type: TP #: man-pages/man2/flock.2:49 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:54 msgid "" "Place a shared lock. More than one process may hold a shared lock for a " "given file at a given time." msgstr "" #. type: TP #: man-pages/man2/flock.2:54 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:59 msgid "" "Place an exclusive lock. Only one process may hold an exclusive lock for a " "given file at a given time." msgstr "" #. type: TP #: man-pages/man2/flock.2:59 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:62 msgid "Remove an existing lock held by this process." msgstr "" #. type: Plain text #: man-pages/man2/flock.2:71 msgid "" "A call to B() may block if an incompatible lock is held by another " "process. To make a nonblocking request, include B (by ORing) with " "any of the above operations." msgstr "" #. type: Plain text #: man-pages/man2/flock.2:73 msgid "" "A single file may not simultaneously have both shared and exclusive locks." msgstr "" #. type: Plain text #: man-pages/man2/flock.2:88 msgid "" "Locks created by B() are associated with an open file description " "(see B(2)). This means that duplicate file descriptors (created by, " "for example, B(2) or B(2)) refer to the same lock, and this " "lock may be modified or released using any of these descriptors. " "Furthermore, the lock is released either by an explicit B operation " "on any of these duplicate descriptors, or when all such descriptors have " "been closed." msgstr "" #. type: Plain text #: man-pages/man2/flock.2:97 msgid "" "If a process uses B(2) (or similar) to obtain more than one " "descriptor for the same file, these descriptors are treated independently by " "B(). An attempt to lock the file using one of these file descriptors " "may be denied by a lock that the calling process has already placed via " "another descriptor." msgstr "" #. type: Plain text #: man-pages/man2/flock.2:104 msgid "" "A process may hold only one type of lock (shared or exclusive) on a file. " "Subsequent B() calls on an already locked file will convert an " "existing lock to the new lock mode." msgstr "" #. type: Plain text #: man-pages/man2/flock.2:109 msgid "Locks created by B() are preserved across an B(2)." msgstr "" #. type: Plain text #: man-pages/man2/flock.2:112 msgid "" "A shared or exclusive lock can be placed on a file regardless of the mode in " "which the file was opened." msgstr "" #. type: SH #: man-pages/man2/flock.2:112 #, no-wrap msgid "RETURN VALUE" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:117 msgid "" "On success, zero is returned. On error, -1 is returned, and I is set " "appropriately." msgstr "" #. type: SH #: man-pages/man2/flock.2:117 #, no-wrap msgid "ERRORS" msgstr "" #. type: TP #: man-pages/man2/flock.2:118 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:122 msgid "I is not an open file descriptor." msgstr "" #. type: TP #: man-pages/man2/flock.2:122 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:127 msgid "" "While waiting to acquire a lock, the call was interrupted by delivery of a " "signal caught by a handler; see B(7)." msgstr "" #. type: TP #: man-pages/man2/flock.2:127 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:131 msgid "I is invalid." msgstr "" #. type: TP #: man-pages/man2/flock.2:131 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:134 msgid "The kernel ran out of memory for allocating lock records." msgstr "" #. type: TP #: man-pages/man2/flock.2:134 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:139 msgid "The file is locked and the B flag was selected." msgstr "" #. type: SH #: man-pages/man2/flock.2:139 #, no-wrap msgid "CONFORMING TO" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:148 msgid "" "4.4BSD (the B() call first appeared in 4.2BSD). A version of " "B(), possibly implemented in terms of B(2), appears on most " "UNIX systems." msgstr "" #. type: SH #: man-pages/man2/flock.2:148 #, no-wrap msgid "NOTES" msgstr "" #. E.g., according to the flock(2) man page, FreeBSD since at least 5.3 #. type: Plain text #: man-pages/man2/flock.2:171 msgid "" "Since kernel 2.0, B() is implemented as a system call in its own " "right rather than being emulated in the GNU C library as a call to " "B(2). This yields classical BSD semantics: there is no interaction " "between the types of lock placed by B() and B(2), and " "B() does not detect deadlock. (Note, however, that on some modern " "BSDs, B() and B(2) locks I interact with one another.)" msgstr "" #. commit 5eebde23223aeb0ad2d9e3be6590ff8bbfab0fc2 #. type: Plain text #: man-pages/man2/flock.2:202 msgid "" "In Linux kernels up to 2.6.11, B() does not lock files over NFS (i.e." ", the scope of locks was limited to the local system). Instead, one could " "use B(2) byte-range locking, which does work over NFS, given a " "sufficiently recent version of Linux and a server which supports locking. " "Since Linux 2.6.12, NFS clients support B() locks by emulating them " "as byte-range locks on the entire file. This means that B(2) and " "B() locks I interact with one another over NFS. Since Linux 2.6." "37, the kernel supports a compatibility mode that allows B() locks " "(and also B(2) byte region locks) to be treated as local; see the " "discussion of the I option in B(5)." msgstr "" #. type: Plain text #: man-pages/man2/flock.2:208 msgid "" "B() places advisory locks only; given suitable permissions on a " "file, a process is free to ignore the use of B() and perform I/O on " "the file." msgstr "" #. type: Plain text #: man-pages/man2/flock.2:221 msgid "" "B() and B(2) locks have different semantics with respect to " "forked processes and B(2). On systems that implement B() using " "B(2), the semantics of B() will be different from those " "described in this manual page." msgstr "" #. Kernel 2.5.21 changed things a little: during lock conversion #. it is now the highest priority process that will get the lock -- mtk #. type: Plain text #: man-pages/man2/flock.2:234 msgid "" "Converting a lock (shared to exclusive, or vice versa) is not guaranteed to " "be atomic: the existing lock is first removed, and then a new lock is " "established. Between these two steps, a pending lock request by another " "process may be granted, with the result that the conversion either blocks, " "or fails if B was specified. (This is the original BSD behavior, " "and occurs on many other implementations.)" msgstr "" #. type: SH #: man-pages/man2/flock.2:234 #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:243 msgid "" "B(1), B(2), B(2), B(2), B(2), B(2), " "B(2), B(3)" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:248 msgid "" "I in the Linux kernel source tree " "(I in older kernels)" msgstr "" #. type: SH #: man-pages/man2/flock.2:248 #, no-wrap msgid "COLOPHON" msgstr "" #. type: Plain text #: man-pages/man2/flock.2:256 msgid "" "This page is part of release 3.70 of the Linux I project. A " "description of the project, information about reporting bugs, and the latest " "version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/" "." msgstr ""