i'm writing a C program using client-server method, the server sends a file for the client after checking if the file is not locked. The file is locked if it is in use by onther client.
my problem is with the locking mechanism. i have tried to store the file name in a link list and if any client try to get any file , the server should check the file whether it is in the list or not.
but this did not give me a result.
please help me if you have a simple idea and show me how to do it.
i need it as soon as possible
thank you all