Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



UNLINK(2)       DOMAIN/IX Reference Manual (SYS5)       UNLINK(2)



NAME
     unlink - remove directory entry

USAGE
     int unlink (path)
     char *path;

DESCRIPTION
     Unlink removes the directory entry named by path.

     When all links to a file have been removed and no process
     has the file open, the space occupied by the file is freed
     and the file ceases to exist.  If one or more processes have
     the file open when the last link is removed, the removal is
     postponed until all references to the file have been closed.

ERRORS
     The file is unlinked unless one or more of the following is
     true:

     [ENOTDIR]      A component of the path prefix is not a
                    directory.

     [ENOENT]       The named file does not exist.

     [EACCES]       Search permission is denied for a component
                    of the path prefix.

     [EACCES]       Write permission is denied on the directory
                    containing path.

     [EPERM]        Path is a directory and the effective user ID
                    of the process is not super-user.

     [EBUSY]        Path is the mount point for a mounted file
                    system.

     [ETXTBSY]      Path is the last link to a pure procedure
                    (shared text) file that is being executed.

     [EROFS]        Path is part of a read-only file system.

     [EFAULT]       Path points outside the process' allocated
                    address space.

RETURN VALUE
     Unlink returns zero upon successful completion.  Otherwise,
     it returns -1 and sets errno to indicate the error.

RELATED INFORMATION
     rm(1), close(2), link(2), open(2)




Printed 6/4/85                                           UNLINK-1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026