Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Invoking remove() on an open file is implementation-defined. Removing an open file is sometimes recommended to hide the names of temporary files that may be prone to attack (see FIO43-C. Handle Do not create temporary files securelyin shared directories).

In cases requiring the removal of an open file, a more strongly defined function, such as the POSIX unlink() function, should be considered. To be strictly conforming and portable, remove() should not be called on an open file.

...