id summary reporter owner description type status priority milestone component version severity resolution keywords cc 355 fcntl lock API doesn't match POSIX dmik "The file segment lock functionality provided by fcntl() is implemented with the DosSetFileLocks[L] API. However, this API has several serious limitations that make it not compatible with POSIX (http://pubs.opengroup.org/onlinepubs/009695399/functions/fcntl.html, http://man7.org/linux/man-pages/man2/fcntl.2.html): 1. No deadlock detection. If process A holds a lock of byte 1 and attempts to lock byte 2 in wait mode while process B holds a lock of byte 2 and attempts to lock byte 1 in wait mode, both will wait forever. 2. No support for overlapping ranges, automatic range split/join with atomic lock upgrade etc. This makes fcntl() file locks barely usable in real POSIX applications. One of the examples is Samba where these locks are used heavily to implement TDB (database) locking and multi-process access. Samba is a critical piece of software hence proper fcntl() lock support is such as well." defect new high new libc 0.6.6 normal