Mandatory Locking
A file is marked as a candidate for mandatory by setting the group-id bit in its file mode but removing the group-execute bit.Can Some body explain this in a more clearer way
|
Well, chmod g-x file; chmod g+s file. Ok, mandatory locking can be applied.
|
Thanks raskin for u r quick reply.
I will tell my question even more clearly. When I Open a file, it would be associated with a "file" structure in open file table. Now When I apply a lock on this file, Is there any field inside "file" structure which will be a modified to tell that this file is locked or Is there any other way. |
According to your nick, you must have fresh kernel unpacked. Go to Documentation. read mandatory.txt . If you mean FILE*, well, FILE* is option. If you mean internal kernel structure - yes, but stable-api-nonsense.txt, so don't rely on it unless you are writing in-kernel code related to it in which case you look up in the source. Generally you have fcntl (read man) to get/set state of locking.
|
All times are GMT -5. The time now is 04:07 PM. |