Table of Contents

NAME

SYNOPSIS

DESCRIPTION

causes the link named to be renamed as If exists, it is first removed. Both and must be of the same type (that is, both directories or both non-directories), and must reside on the same file system. guarantees that an instance of will always exist, even if the system should crash in the middle of the operation. If the final component of is a symbolic link, the symbolic link is renamed, not the file or directory to which it points.

CAVEAT

The system can deadlock if a loop in the file system graph is present. This loop takes the form of an entry in directory say being a hard link to directory and an entry in directory say being a hard link to directory When such a loop exists and two separate processes attempt to perform and respectively, the system may deadlock attempting to lock both directories for modification. Hard links to directories should be replaced by symbolic links by the system administrator.

RETURN VALUES

A 0 value is returned if the operation succeeds, otherwise returns -1 and the global variable indicates the reason for the failure.

ERRORS

will fail and neither of the argument files will be affected if: A component of a pathname exceeded characters, or an entire path name exceeded characters. A component of the path does not exist, or a path prefix of does not exist. A component of either path prefix denies search permission. The requested link requires writing in a directory with a mode that denies write permission. The directory containing is marked sticky, and neither the containing directory nor are owned by the effective user ID. The file exists, the directory containing is marked sticky, and neither the containing directory nor are owned by the effective user ID. Too many symbolic links were encountered in translating either pathname. A component of either path prefix is not a directory. is a directory, but is not a directory. is a directory, but is not a directory. The link named by and the file named by are on different logical devices (file systems). Note that this error code will not be returned if the implementation permits cross-device links. The directory in which the entry for the new name is being placed cannot be extended because there is no space left on the file system containing the directory. The directory in which the entry for the new name is being placed cannot be extended because the user’s quota of disk blocks on the file system containing the directory has been exhausted. An I/O error occurred while making or updating a directory entry. The requested link requires writing in a directory on a read-only file system. points outside the process’s allocated address space. is a parent directory of or an attempt is made to rename or is a directory and is not empty.

SEE ALSO

STANDARDS

The function conforms to


Table of Contents