links and lox

utzoo!decvax!ucbvax!unix-wizards utzoo!decvax!ucbvax!unix-wizards
Tue Aug 18 01:56:50 AEST 1981


>From CSL.JLH.MOGUL at SU-SCORE Mon Aug 17 22:42:45 1981
I have found that a simple modification to the "file-as-lock"
method can avoid some of the hassles of crashed programs.

We have a printer spooler that is similar to lpd.  It uses
the same locking code, except that a lock is broken if
it has been modified more that some timeout period ago
(e.g., 10 minutes).  Also, the spooler detects if some
other spooler is running by seeing whether the file was modified
more recently than it did itself.  This may lead to
an occasional multiple-copy, but does avoid the persistant
locks left around by crashed spoolers.

Our version of lpq knows about this lock timeout and will start
a new spooler if the lock is too old.
-Jeff
-------




More information about the Comp.unix.wizards mailing list