unlinkat(2): unlinkat(AT_REMOVEDIR) fails with ENOTEMPTY like rmdir()

for non-empty directories.

POSIX permits both ENOTEMPTY and EEXIST, but we use the clearer ENOTEMPTY,
following BSD tradition.

MFC after:	1 week
This commit is contained in:
Jilles Tjoelker 2010-04-25 13:55:52 +00:00
parent 141c21d9de
commit b559746adb

View File

@ -28,7 +28,7 @@
.\" @(#)unlink.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
.Dd April 10, 2008
.Dd April 25, 2010
.Dt UNLINK 2
.Os
.Sh NAME
@ -167,7 +167,7 @@ argument does not specify an absolute path and the
argument is neither
.Dv AT_FDCWD
nor a valid file descriptor open for searching.
.It Bq Er EEXIST
.It Bq Er ENOTEMPTY
The
.Fa flag
parameter has the