日期:2014-05-16  浏览次数:20732 次

关于flock与fcntl区别
看到下面这段文字,没看懂,请解释一下:
A process can never lock itself out of a file region, even when placing locks via
multiple file descriptors referring to the same file. (This contrasts with flock())


另外,如果能全面的解释一下flock与fcntl在文件锁上使用的区别,不胜感谢。


------解决方案--------------------
这段话是哪儿的?

貌似flock只能锁定整个文件,而不能锁定其中的某个区域
------解决方案--------------------
就是flock可以锁超过文件大小的偏移量,fcntl不行。