unlink
is as specified in the
ISO/IEC 9945:2003 Portable Operating System(POSIX)and The Single UNIX® Specification(SUS) V3, but with differences as listed below.
See also Additional behaviors: unlink/link on directory>.
If path specifies a directory, the implementation may return EISDIR instead of EPERM as specified by ISO/IEC 9945:2003 Portable Operating System(POSIX)and The Single UNIX® Specification(SUS) V3. [1]
[1] | The Linux kernel has deliberately chosen EISDIR for this case and does not expect to change (Al Viro, personal communication). |