using signal(2) with locks

utzoo!decvax!ucbvax!unix-wizards utzoo!decvax!ucbvax!unix-wizards
Tue Aug 18 14:16:42 AEST 1981


>From Dave-Yost at RAND-UNIX Tue Aug 18 14:09:23 1981

Here's the race condition.  Consider processes A & B:
    A: determine that lock file is dead
    B: determine that lock file is dead
    A: unlink lock file
    A: link to lock file
    B: unlink lock file
    B: link to lock file

Now each of them thinks he has a valid lock.

--dave




More information about the Comp.unix.wizards mailing list