/usr/spool/lock

Michael H. Warfield Mike mhw at wittsend.lbp.harris.com
Sun Oct 22 03:33:03 AEST 1989


In article <21202 at adm.BRL.MIL> SIMSN%NUSDISCS.BITNET at cunyvm.cuny.edu writes:
> What are LTMP.xxxxx files??

	Those are temporary files that normally would be linked to the final
lock file and then removed.

> xxxxx are numbers and I found many of these files in the above
> directory.

	The "xxxxx" should be the process id of the process creating the
file.  That insures a unique file name with respect to the rest of the
system.

	You seem to have a process somewhere which is failing to properly
create lock files.  The usual technique is to create on of these temporary
files and then link it to the desired lock file name.  The link fails if
the lock already exists and creates the lock if it didn't.  The operation is
"indivisable" as a system call and amounts to the best "test and set"
operation you can come up with for file system operations.  In any case
the process attempting the lock should immediately remove the temp file.
If it failed, it may sleep and try again or it may abort out depending
on the application.  Some systems also support a file create which errors
out if the files already exists but the "link" trick is the one most
universally supported.

Michael H. Warfield  (The Mad Wizard)	| gatech.edu!galbp!wittsend!mhw
  (404)  270-2123 / 270-2098		| mhw at wittsend.LBP.HARRIS.COM
An optimist believes we live in the best of all possible worlds.
A pessimist is sure of it!



More information about the Comp.unix.questions mailing list