tags:

views:

88

answers:

1
+1  Q: 

accessing a file

On Linux, how can I make sure that my program is the only one accessing a file?

+5  A: 

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.

nc3b
Why is this voted down ?
nc3b
@nc3b dunno, but it seems perfectly reasonable to me.
WhirlWind