X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=doc%2Fposix-functions%2Funlink.texi;h=50d45acc6be00e708107c5f8d6695bd488e65ba1;hb=a155c5688ab059c1c2fff7f132116b455ddb37ba;hp=e3a59c830a83cc4a02ba1d2db96711965ba940e7;hpb=2b6c08c775ae4e80b52aa41058ea5939f778b44b;p=gnulib.git diff --git a/doc/posix-functions/unlink.texi b/doc/posix-functions/unlink.texi index e3a59c830..50d45acc6 100644 --- a/doc/posix-functions/unlink.texi +++ b/doc/posix-functions/unlink.texi @@ -2,17 +2,33 @@ @section @code{unlink} @findex unlink -POSIX specification: @url{http://www.opengroup.org/susv3xsh/unlink.html} +POSIX specification: @url{http://www.opengroup.org/onlinepubs/9699919799/functions/unlink.html} -Gnulib module: --- +Gnulib module: unlink Portability problems fixed by Gnulib: @itemize +@item +Some systems mistakenly succeed on @code{unlink("link-to-file/")}: +GNU/Hurd, FreeBSD 7.2, Solaris 9. +@item +On MacOS X 10.5.6, in a writable HFS mount, @code{unlink("..")} succeeds +without doing anything. @end itemize Portability problems not fixed by Gnulib: @itemize @item +Some systems allow a superuser to unlink directories, even though this +can cause file system corruption. The error given if a process is not +permitted to unlink directories varies across implementations; it is +not always the POSIX value of @code{EPERM}. Meanwhile, if a process +has the ability to unlink directories, POSIX requires that +@code{unlink("symlink-to-dir/")} remove @file{dir} and leave +@file{symlink-to-dir} dangling; this behavior is counter-intuitive. +The gnulib module unlinkdir can help determine whether code must be +cautious of unlinking directories. +@item Removing an open file is non-portable: On Unix this allows the programs that have the file already open to continue working with it; the file's storage is only freed when the no process has the file open any more. On Windows,