Lockfiles

utzoo!decvax!ucbvax!mhtsa!ihnss!vax135!cornell!pavel utzoo!decvax!ucbvax!mhtsa!ihnss!vax135!cornell!pavel
Fri Oct 2 12:06:47 AEST 1981


	Maybe I'm missing something obvious, but what's wrong with
the following locking mechanism?  It's the one I've always used and
never (to my knowledge) had any races:
		while((lfd = creat(LOCKFILE, 0)) < 0) sleep(10);
Isn't creat() an atomic operation?
			--Pavel Curtis  (Pavel.Cornell at Udel)



More information about the Comp.unix.wizards mailing list