5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/unlink.html}
9 Portability problems fixed by Gnulib:
12 Some systems mistakenly succeed on @code{unlink("link-to-file/")}:
13 GNU/Hurd, FreeBSD 7.2, AIX 7.1, Solaris 9.
15 On Mac OS X 10.10, in a writable HFS mount, @code{unlink("..")} succeeds
16 without doing anything.
19 Portability problems not fixed by Gnulib:
22 Some systems allow a superuser to unlink directories, even though this
23 can cause file system corruption. The error given if a process is not
24 permitted to unlink directories varies across implementations; it is
25 not always the POSIX value of @code{EPERM}. Meanwhile, if a process
26 has the ability to unlink directories, POSIX requires that
27 @code{unlink("symlink-to-dir/")} remove @file{dir} and leave
28 @file{symlink-to-dir} dangling; this behavior is counter-intuitive.
29 The gnulib module @code{unlinkdir} can help determine whether code must be
30 cautious of unlinking directories.
32 Removing an open file is non-portable: On Unix this allows the programs that
33 have the file already open to continue working with it; the file's storage
34 is only freed when the no process has the file open any more. On Windows,
35 the attempt to remove an open file fails.