patch-2.0.21-2.1.0 linux/Documentation/locks.txt
Next file: linux/Documentation/mandatory.txt
Previous file: linux/Documentation/ide.txt
Back to the patch index
Back to the overall index
- Lines: 67
- Date:
Sun Sep 22 09:41:32 1996
- Orig file:
lx2.0/v2.0.21/linux/Documentation/locks.txt
- Orig date:
Wed May 15 11:22:04 1996
diff -u --recursive --new-file lx2.0/v2.0.21/linux/Documentation/locks.txt linux/Documentation/locks.txt
@@ -2,14 +2,14 @@
Andy Walker <andy@lysaker.kvaerner.no>
- 15 May 1996
+ 21 Sep 1996
-What's New?
------------
+1. What's New?
+--------------
-Flock Emulation Warnings
-------------------------
+1.1 Flock Emulation Warnings
+----------------------------
Many people will have noticed the ugly messages that the file locking
code started generating with the release of kernel version 1.3.95. The
messages look something like this:
@@ -23,16 +23,21 @@
results if, for example, sendmail attempts to use them.
Fixed versions of the C libraries have been on public release for many
-months. The latest versions are 5.2.18 or 5.3.12 for ELF, and I believe
-somebody made a 4.7.6 release for people using a.out systems.
+months. The latest versions at the time of writing are 5.3.12 (released)
+or 5.4.6 (testing) for ELF. There is also a 4.7.6 release for people
+using a.out systems.
+
+With the release of Linux 2.0 Linus decided to be lenient on the
+stragglers and changed the warning message so that the kernel will only
+complain once and then shut up. That should make life more bearable even
+for people who, for some reason, don't want to upgrade their libraries.
+
-In 1.3.96 Linus decided to be lenient on the stragglers and changed the
-warning message so that the kernel will only complain five times and
-then shut up. That should make life more bearable even for people who,
-for some reason, don't want to upgrade.
+1.2 Disallow Mixed Locks
+------------------------
-Sendmail Problems
------------------
+1.2.1 Sendmail Problems
+---------------------
Because sendmail was unable to use the old flock() emulation, many sendmail
installations use fcntl() instead of flock(). This is true of Slackware 3.0
for example. This gave rise to some other subtle problems if sendmail was
@@ -42,8 +47,9 @@
over time, or under a very heavy mail load, would eventually cause the kernel
to lock solid with deadlocked processes.
-Disallow Mixed Locks
---------------------
+
+1.2.2 The Solution
+------------------
I have chosen the rather cruel solution of disallowing mixed locking styles
on a given file at a given time. Attempts to lock a file with flock() when
fcntl() locks exist, or vice versa, return with an error status of EBUSY.
@@ -61,4 +67,3 @@
sendmail may have problems running in 'newaliases' mode. It will no longer
deadlock though. Recompile sendmail to use flock() and your troubles will
be over.
-
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov