I see that standard C has no way of telling if a file is already opened in another process. So the answer should contain several examples for each platform. I need that chec
Any such check would be inherently racy. Another process could always open the file between the point where you did the check and the point where you accessed the file.