vendredi 22 novembre 2019

Is there any way to restrict number of users accesing the file

I am coding in a huge dependant environment, where multiple processes are running. In this ecosystem, there in one file which needs to modified by almost all processes running.

Here every process is having a different file descriptor for the same file path.

Is there any way I can restrict the file opening such that only one instance of that file, can be opened, and all other instances be queued ?

I have tried mutex and flock, but they don't really serve the purpose.

Please tell me any way that you feel might help !

Aucun commentaire:

Enregistrer un commentaire