How to fine file lock on Linux under C?
Hello I am trying to fine file locking (read, and write, individual locked spaces), but my problem is that fcntl seems to not work in threads. Because threads have the same locks (only works in diffrent programs)
I use lockf instead fo fcntl, but program segfault. Could be because file is mmaped?
flock is a very poor interface that seems to work with ptreads because lock de inode and not the file descritor.
Any suggestion are wellcome. Thanks in advance.
|