Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: explained re-open race condition

...

Some platforms may forbid a file simultaneously being opened multiple times, but platforms that allow it may facilitate dangerous race conditions. This is because it is possible for an open file to be moved or deleted on many platforms. If a program re-opens a file using the same pathname, there is no guarantee that the same file is being accessed.

Noncompliant Code Example

...