Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fdetach(3C) — DG/UX R4.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fattach(3C)

streamio(7)

reentrant(3)



fdetach(3C)                       SDK R4.11                      fdetach(3C)


NAME
       fdetach - detach a name from a STREAMS-based file descriptor

SYNOPSIS
       #include <unistd.h>

       int fdetach(const char *path)

DESCRIPTION
       The fdetach routine detaches a STREAMS-based file descriptor from a
       name in the file system.  path is the path name of the object in the
       file system name space, which was previously attached [see
       fattach(3C)].  The user must be the owner of the file or a user with
       the appropriate privileges.  All subsequent operations on path will
       operate on the file system node and not on the STREAMS file.  The
       permissions and status of the node are restored to the state the node
       was in before the STREAMS file was attached to it.


   Considerations for Threads Programming
                     +---------+-----------------------------+
                     |         |                      async- |
                     |function | reentrant   cancel   cancel |
                     |         |             point     safe  |
                     +---------+-----------------------------+
                     |fdetach  |     Y         Y        N    |
                     +---------+-----------------------------+

RETURN VALUE
       If successful, fdetach returns 0; otherwise it returns -1 and sets
       errno to indicate an error.

DIAGNOSTICS
       Under the following conditions, the function fdetach fails and sets
       errno to:

       EPERM        The effective user ID is not the owner of path or is not
                    a user with appropriate permissions.

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

       ENOENT       path does not exist.

       EINVAL       path is not attached to a STREAMS file.

       ENAMETOOLONG The size of path exceeds {PATHMAX}, or a path name
                    component is longer than {NAMEMAX} while
                    {POSIXNOTRUNC} is in effect.

       ELOOP        Too many symbolic links were encountered in translating
                    path.

SEE ALSO
       fattach(3C), streamio(7)
       in the Programmer's Guide: STREAMS and reentrant(3).


Licensed material--property of copyright holder(s)

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