FGETLK
FGETLK is a command used with the fcntl system call to examine advisory file-region locks on a file descriptor without actually acquiring them. It is used to determine whether a requested lock could be granted and to obtain information about any existing conflicting locks.
To use FGETLK, a program fills a struct flock with the region and lock type it would
The operation is non-blocking: it reports immediately whether the requested lock would be possible and provides
Notes and variations: Locking with fcntl is advisory, so behavior depends on all cooperating processes using