Manual page for fdetach(3C)
fdetach - detach a name from a STREAMS-based file descriptor
SYNOPSIS
int fdetach(const char *path);
MT-LEVEL
Unsafe
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.
RETURN VALUES
If successful,
fdetach()
returns 0; otherwise it returns -1 and sets
errno to indicate an error.
ERRORS
Under the following conditions, the function
fdetach()
fails and sets errno to:
- EINVAL
-
path
is not attached to a STREAMS file.
- ELOOP
-
Too many symbolic links were encountered in translating
path.
- ENAMETOOLONG
-
The size of
path
exceeds {PATH_MAX}, or a path name component
is longer than {NAME_MAX} while {_POSIX_NO_TRUNC} is in effect.
- ENOENT
-
path
does not exist.
- ENOTDIR
-
A component of the path prefix is not a directory.
- EPERM
-
The effective user ID is not the owner of
path
or is not a user with appropriate permissions.
SEE ALSO
fdetach.1m
fattach.3c
streamio.7i
Created by unroff & hp-tools.
© by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97