2 .\" Copyright 1989 AT&T. Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH FATTACH 3C "Jul 24, 2002"
8 fattach \- attach a STREAMS- or doors-based file descriptor to an object in the
15 \fBint\fR \fBfattach\fR(\fBint\fR \fIfildes\fR, \fBconst char *\fR\fIpath\fR);
21 The \fBfattach()\fR function attaches a STREAMS- or doors-based file descriptor
22 to an object in the file system name space, effectively associating a name with
23 \fIfildes\fR. The \fIfildes\fR argument must be a valid open file descriptor
24 representing a STREAMS or doors file. The \fIpath\fR argument is a path name of
25 an existing object and the user must have appropriate privileges or be the
26 owner of the file and have write permissions. All subsequent operations on
27 \fIpath\fR will operate on the STREAMS or doors file until the STREAMS or doors
28 file is detached from the node. The \fIfildes\fR argument can be attached to
29 more than one \fIpath\fR, that is, a stream or door can have several names
33 The attributes of the named stream or door (see \fBstat\fR(2)), are initialized
34 as follows: the permissions, user ID, group ID, and times are set to those of
35 \fIpath\fR, the number of links is set to 1, and the size and device identifier
36 are set to those of the streams or doors device associated with \fIfildes\fR.
37 If any attributes of the named stream or door are subsequently changed (for
38 example, \fBchmod\fR(2)), the attributes of the underlying object are not
43 Upon successful completion, \fBfattach()\fR returns \fB0\fR. Otherwise it
44 returns \fB\(mi1\fR and sets \fBerrno\fR to indicate an error.
48 The \fBfattach()\fR function will fail if:
55 The user is the owner of \fIpath\fR but does not have write permissions on
56 \fIpath\fR or \fIfildes\fR is locked.
65 The \fIfildes\fR argument is not a valid open file descriptor.
74 The \fIpath\fR argument is currently a mount point or has a STREAMS or doors
75 file descriptor attached to it.
84 The \fIpath\fR argument is a file in a remotely mounted directory.
93 The \fIfildes\fR argument does not represent a STREAMS or doors file.
102 Too many symbolic links were encountered in translating \fIpath\fR.
108 \fB\fBENAMETOOLONG\fR\fR
111 The size of \fIpath\fR exceeds {\fB\fR\fBPATH\fR\fB_MAX\fR}, or the component
112 of a path name is longer than {\fBNAME_MAX\fR} while {\fB_POSIX_NO_TRUNC\fR} is
122 The \fIpath\fR argument does not exist.
131 A component of a path prefix is not a directory.
140 The effective user ID is not the owner of \fIpath\fR or a user with the
141 appropriate privileges.
147 See \fBattributes\fR(5) for descriptions of the following attributes:
155 ATTRIBUTE TYPE ATTRIBUTE VALUE
157 Interface Stability Standard
165 \fBfdetach\fR(1M), \fBchmod\fR(2), \fBmount\fR(2), \fBstat\fR(2),
166 \fBdoor_create\fR(3C), \fBfdetach\fR(3C), \fBisastream\fR(3C),
167 \fBattributes\fR(5), \fBstandards\fR(5), \fBstreamio\fR(7I)
170 \fISTREAMS Programming Guide\fR