>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.
What are flocks in this context? Surely not a number of sheep...
What are flocks in this context? Surely not a number of sheep...