fattach() — attach a STREAMS file descriptor to an object in the file system name space
int fattach(int fd, const char *path);
function attaches the
to an object in the file system name space designated by
specifies an open file descriptor to a
STREAMS device or
specifies the pathname of an existing object in the file system.
STREAMS device or pipe can be attached to more than one node
in the file system name space. In other words, a
STREAMS device or pipe is allowed to have several associated names.
STREAMS device or pipe is detached from the node (with
all operations on
will act on the
STREAMS device or pipe instead of the file system object
stream's attributes (see the
reference page) are set according to the following scheme:
The group ID, user ID, times, and permissions are set to those of
The size as well as the device number are set to those of the
STREAMS device or pipe designated by the
Note that although the attributes of the
STREAMS device or pipe may change (see the
reference page), the attributes of the underlying file system object
will not be changed.
The number of links is set to 1.
Upon successful completion, the
function returns a value of 0 (zero). Otherwise, it returns a value of -1, and
is set to indicate the error.
If any of the following conditions occurs, the
to the value that corresponds to the condition.
Although the user is the owner of
the user has no write
permissions for it.
parameter is an invalid file descriptor.
The existing object specified by the
parameter is already mounted or has a file descriptor
attached to it.
parameter points to a location
outside of the allocated address space of the process.
parameter does not refer to a
STREAMS device or
was translated, too many symbolic links were found.
does not exist.
The directory portion of the
parameter does not exist.
The size of a pathname component is longer than
is in effect, or the pathname length is longer than
The current effective user ID is not the owner of the existing object
specified by the