top | item 46910866

(no title)

Igrom | 25 days ago

>fcntl(fd, F_GETLK, &lock), fcntl(fd, F_SETLK, &lock), and fcntl(fd, F_SETLKW, &lock)

There's also `flock`, the CLI utility in util-linux, that allows using flocks in shell scripts.

discuss

order

pjmlp|24 days ago

In UNIX/POSIX file locks are advisory, not enforced, it only works if all processes play ball.

zbentley|24 days ago

Sure, but the discussion is around whether they’re atomic, not whether they’re advisory.