Lines Matching refs:a

11 The Linux implementation is prey to a number of difficult-to-fix race
14 - The write system call checks for a mandatory lock only once
15 at its start. It is therefore possible for a lock request to
17 A process may then see file data change even while a mandatory
19 - Similarly, an exclusive lock may be granted on a file after
20 the kernel has decided to proceed with a read, but before the
22 the file data in a state which should not have been visible
33 (and the lockf() library routine which is a wrapper around fcntl().) It is
34 normally a process' responsibility to check for locks on a file it wishes to
37 troublesome) is access to a user's mailbox. The mail user agent and the mail
41 In a perfect world all processes would use and honour a cooperative, or
43 a lot of poorly written code out there.
46 with a "mandatory" locking scheme, whereby the operating system kernel would
47 block attempts by a process to write to a file that another process holds a
48 "read" -or- "shared" lock on, and block attempts to both read and write to a
49 file that a process holds a "write " -or- "exclusive" lock on.
66 2. Marking a file for mandatory locking
69 A file is marked as a candidate for mandatory locking by setting the group-id
75 a setgid file is written to. This is a security measure. The kernel has been
76 modified to recognize the special case of a mandatory lock candidate and to
89 All the reference systems reject all calls to open() for a file on which
96 HP-UX even disallows open() with O_TRUNC for a file with advisory locks, not
101 also disallows advisory locks for such a file. SVID actually specifies the
120 locks using flock() never result in a mandatory lock.
122 2. If a process has locked a region of a file with a mandatory read lock, then
129 3. If a process has locked a region of a file with a mandatory write lock, all
131 unless a process has opened the file with the O_NONBLOCK flag in which case
134 4. Calls to open() with O_TRUNC, or to creat(), on a existing file that has
138 5. Attempts to apply a mandatory lock to a file that is memory mapped and
142 6. Attempts to create a shared memory map of a file (via mmap() with MAP_SHARED)
149 Those which modify a file's contents, not just the inode. That gives read(),
156 defined as the bytes of a file removed or added (we must also consider bytes
157 added, as a lock can specify just "the whole file", rather than a specific
162 better still fix the system calls yourself and submit a patch to me or Linus.
167 Not even root can override a mandatory lock, so runaway processes can wreak
170 Of course, that might be a bit tricky if the system is hung :-(