On Linux, how can I make sure that my program is the only one accessing a file?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I am not sure, but I believe you are referring to file locking. See this and this and don’t forget this. Your display name is gcc but if you are doing this on windows, see LockFileEx.