I was confused for a very long time with the meaning of the -n flag for flock(1).
Basically there are many guides for this tool, and often what we see is some command like flock -n 100. Here, fd number 100 is associated with some lockfile and used to perform locking.
Today I kept getting confused because I would do some simple tests, and flock would exit with failure immediately.
What exactly does the -n flag of flock do? Am I right in thinking that -n 100 associates file descriptor number 100 with some lockfile?