fattach - Attaches a STREAMS-based file descriptor to an object in the file system name space
Standard C Library (libc.so, libc.a)
const char *path);
Interfaces documented on this reference page conform to industry standards as follows:
Refer to the standards(5) reference page for more information about industry standards and associated tags.
Specifies an open STREAMS-based file descriptor that is valid. Specifies the pathname of an existing ordinary file or directory.
The fattach() function attaches the fd file descriptor to an object in the file system name space (designated by path). A file descriptor can be attached to more than one node in the file system name space. In other words, a file is allowed to have several associated names. Until that file is detached from the node (with the fdetach() function), any later operations on path will affect that file.
The attached file's attributes (see the stat() reference page) are set according to the following scheme: The group ID, user ID, times, and permissions are set to those of path. The size as well as the device identifier are set to those of the file device designated by the fd parameter. Note that although the attributes of the attached file may change (see the chmod() reference page), the underlying object's attributes will not change accordingly. The number of links is set to 1.
The fattach() function is similar to the mount function. Rather than mounting a file system on a mount point, the fattach() function mounts a file descriptor on a mount point which may be a directory or a file.
Upon successful completion, the fattach() function returns a value of 0 (zero). Otherwise, it returns a value of -1, and errno is set to indicate the error.
If any of the following conditions occurs, the fattach() function sets errno to the value that corresponds to the condition.
Although the user is the owner of path, the user has no write permissions for it, or the object designated by fd is locked. The fd parameter is an invalid file descriptor. The existing object specified by the path parameter is already mounted or has a file descriptor attached to it. [Digital] The path parameter points to a location outside of the allocated address space of the process. The fd parameter refers to a socket.
[Digital] The fattach() function requires that the FFM_FS kernel option be configured. See System Administration for information on configuring kernel options.
Functions: fdetach(3), isastream(3), chmod(2), stat(2), mount(2)
Standards: standards(5) delim off