NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUES | ATTRIBUTES | SEE ALSO | BUGS
#include <unistd.h>int unlink(const char *path);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
MSDOSFS, NFS_CLIENT, UFS
The unlink() system call removes the directory entry named referred to by path.
Upon successful completion, unlink() returns 0. Otherwise it returns -1 and sets errno to indicate one of the following error conditions:
A component of the path prefix is not a directory.
The file does not exist.
Search permission is denied for a component of the path prefix.
Write permission is denied on the directory containing the link to be removed.
The entry to be unlinked is the mount point for a mounted file system.
The directory entry to be unlinked is part of a read-only file system.
The length of a component of path exceeds NAME_MAX
characters, or the length of path exceeds PATH_MAX
characters.
Too many symbolic links or symbolic ports were encountered during analysis of path.
An I/O error occurred while making the directory entry or allocating the inode.
path points outside the allocated address space of the actor.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
MT-Level | Async-Signal-Safe |
Interface Stability | Evolving |
Weaknesses in the protocol underlying NFS may cause files in directories mounted over NFS to disappear while still in use. In order to avoid this problem, always call close() before calling unlink().
NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUES | ATTRIBUTES | SEE ALSO | BUGS