diff options
Diffstat (limited to 'lib/libc/sys/unlink.2')
-rw-r--r-- | lib/libc/sys/unlink.2 | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/libc/sys/unlink.2 b/lib/libc/sys/unlink.2 index 78221bc..8693f95 100644 --- a/lib/libc/sys/unlink.2 +++ b/lib/libc/sys/unlink.2 @@ -30,6 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)unlink.2 8.1 (Berkeley) 6/4/93 +.\" $Id$ .\" .Dd June 4, 1993 .Dt UNLINK 2 @@ -56,6 +57,8 @@ all resources associated with the file are reclaimed. If one or more process have the file open when the last link is removed, the link is removed, but the removal of the file is delayed until all references to it have been closed. +.Fa path +may not be a directory. .Sh RETURN VALUES Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and @@ -68,8 +71,6 @@ succeeds unless: .Bl -tag -width ENAMETOOLONGAA .It Bq Er ENOTDIR A component of the path prefix is not a directory. -.It Bq Er EINVAL -The pathname contains a character with the high-order bit set. .It Bq Er ENAMETOOLONG A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. @@ -83,8 +84,7 @@ to be removed. .It Bq Er ELOOP Too many symbolic links were encountered in translating the pathname. .It Bq Er EPERM -The named file is a directory and the effective user ID -of the process is not the super-user. +The named file is a directory. .It Bq Er EPERM The directory containing the file is marked sticky, and neither the containing directory nor the file to be removed @@ -104,9 +104,16 @@ points outside the process's allocated address space. .Sh SEE ALSO .Xr close 2 , .Xr link 2 , -.Xr rmdir 2 +.Xr rmdir 2 , .Xr symlink 7 .Sh HISTORY An -.Nm -function call appeared in Version 6 AT&T UNIX. +.Fn unlink +function call appeared in +.At v6 . +.Pp +The +.Fn unlink +system call traditionally allows the super-user to unlink directories which +can damage the filesystem integrity. This implementation no longer permits +it. |