in reply to Re^3: opening files: link checking and race conditions
in thread opening files: link checking and race conditions

No, the whole point is that you can't guarantee that the thing the filename "foo" points to doesn't change between operations. You're only making it harder, not impossible, to mess with foo.

update see Re: opening files: link checking and race conditions for code that can cause your method to fail, and Re^2: opening files: link checking and race conditions for the best solution (even if it's not 100% portable)

  • Comment on Re^4: opening files: link checking and race conditions