*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: fattach | Section: 3 | Source: Digital UNIX | File: fattach.3.gz
fattach(3) Library Functions Manual fattach(3) NAME fattach - Attaches a STREAMS-based file descriptor to an object in the file system name space LIBRARY Standard C Library (libc.so, libc.a) SYNOPSIS #include <stropts.h> int fattach( int fd, const char *path); STANDARDS Interfaces documented on this reference page conform to industry stan- dards as follows: fattach(): XPG4-UNIX Refer to the standards(5) reference page for more information about in- dustry standards and associated tags. PARAMETERS Specifies an open STREAMS-based file descriptor that is valid. Speci- fies the pathname of an existing ordinary file or directory. DESCRIPTION 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 pa- rameter. Note that although the attributes of the attached file may change (see the chmod() reference page), the underlying object's at- tributes 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. RETURN VALUES Upon successful completion, the fattach() function returns a value of 0 (zero). Otherwise, it returns a value of -1, and errno is set to indi- cate the error. ERRORS 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 permis- sions for it, or the object designated by fd is locked. The fd parame- ter 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 superblock for the file system had an incorrect magic number or an out of range block size. [Digital] The pathname is incorrect. When path was translated, too many symbolic links were found. [Digital] There are too many file descriptors attached (system-wide). The pathname of an existing object specified by the path parameter does not ex- ist or is an empty string. [Digital] The system resources have been exhausted. The directory portion of the path parameter does not exist. The size of a pathname component is longer than NAME_MAX when _POSIX_NO_TRUNC is in effect, the pathname length is longer than PATH_MAX, or the length of the intermediate re- sult of a pathname resolution of a symbolic link is longer than PATH_MAX. The current effective user ID is not the owner of the existing object specified by the path parameter. Another cause of the error is if the current effective user ID does not spec- ify a user with the correct privileges. RESTRICTIONS [Digital] The fattach() function requires that the FFM_FS kernel op- tion be configured. See System Administration for information on con- figuring kernel options. RELATED INFORMATION Functions: fdetach(3), isastream(3), chmod(2), stat(2), mount(2) Commands: fdetach(8) Interfaces: streamio(7) Standards: standards(5) delim off fattach(3)

Navigation Options