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 hn newest cachius|25 days ago What are flocks in this context? Surely not a number of sheep... gbacon|24 days ago https://man.openbsd.org/flock.2https://man7.org/linux/man-pages/man2/flock.2.html ncruces|25 days ago File locks. 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. zbentley|24 days ago Aren’t flock and POSIX locks backed by totally different systems? zbentley|23 days ago Too late to edit, but it appears that they are per this comment on a different article and the documentation it references: https://news.ycombinator.com/item?id=46607265
cachius|25 days ago What are flocks in this context? Surely not a number of sheep... gbacon|24 days ago https://man.openbsd.org/flock.2https://man7.org/linux/man-pages/man2/flock.2.html ncruces|25 days ago File locks.
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.
zbentley|24 days ago Sure, but the discussion is around whether they’re atomic, not whether they’re advisory.
zbentley|24 days ago Aren’t flock and POSIX locks backed by totally different systems? zbentley|23 days ago Too late to edit, but it appears that they are per this comment on a different article and the documentation it references: https://news.ycombinator.com/item?id=46607265
zbentley|23 days ago Too late to edit, but it appears that they are per this comment on a different article and the documentation it references: https://news.ycombinator.com/item?id=46607265
cachius|25 days ago
gbacon|24 days ago
https://man7.org/linux/man-pages/man2/flock.2.html
ncruces|25 days ago
pjmlp|24 days ago
zbentley|24 days ago
zbentley|24 days ago
zbentley|23 days ago