Annotation of cci/usr/src/man/man2/unlink.2, revision 1.1.1.1

1.1       root        1: .TH UNLINK 2 "2 July 1983"
                      2: .UC 4
                      3: .SH NAME
                      4: unlink \- remove directory entry
                      5: .SH SYNOPSIS
                      6: .nf
                      7: .ft B
                      8: unlink(path)
                      9: char *path;
                     10: .fi
                     11: .ft R
                     12: .SH DESCRIPTION
                     13: .I Unlink
                     14: removes the entry for the file
                     15: .I path
                     16: from its directory.
                     17: If this entry was the last link to the file,
                     18: and no process has the file open, then
                     19: all resources associated with the file are reclaimed.
                     20: If, however, the file was open in any process, the actual
                     21: resource reclamation is delayed until it is closed,
                     22: even though the directory entry has disappeared.
                     23: .SH "RETURN VALUE
                     24: Upon successful completion, a value of 0 is returned.
                     25: Otherwise, a value of \-1 is returned and
                     26: .I errno
                     27: is set to indicate the error.
                     28: .SH "ERRORS
                     29: The \fIunlink\fP succeeds unless:
                     30: .TP 15
                     31: [EPERM]
                     32: The path contains a character with the high-order bit set.
                     33: .TP 15
                     34: [ENOENT]
                     35: The path name is too long.
                     36: .TP 15
                     37: [ENOTDIR]
                     38: A component of the path prefix is not a directory.
                     39: .TP 15
                     40: [ENOENT]
                     41: The named file does not exist.
                     42: .TP 15
                     43: [EACCES]
                     44: Search permission is denied for a component of the path prefix.
                     45: .TP 15
                     46: [EACCES]
                     47: Write permission is denied on the directory containing the link
                     48: to be removed.
                     49: .TP 15
                     50: [EPERM]
                     51: The named file is a directory and the effective user ID
                     52: of the process is not the super-user.
                     53: .TP 15
                     54: [EBUSY]
                     55: The entry to be unlinked is the mount point for a
                     56: mounted file system.
                     57: .TP 15
                     58: [EROFS]
                     59: The named file resides on a read-only file system.
                     60: .TP 15
                     61: [EFAULT]
                     62: .I Path
                     63: points outside the process's allocated address space.
                     64: .TP 15
                     65: [ELOOP]
                     66: Too many symbolic links were encountered in translating the pathname.
                     67: .SH "SEE ALSO"
                     68: close(2), link(2), rmdir(2)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.