fdetach() — detach a name from a STREAMS file descriptor
int fdetach(const char *path);
function detaches a file
descriptor from a name in the file system designated by
specifies the path name of an existing object in the file system
name space that was previously attached (see
As a result of the
operation, the node's status and permissions return to the state prior
to the file attaching to the node. Any later operations on
will affect only the file system node and not the attached file.
function is restricted to superusers, or users with the
privilege, or those who own
and have write permission.
In addition to having the
privileges may also be required.
for more information about privileged access on systems that support
Upon successful completion, the
function returns a
value of 0 (zero). Otherwise, it returns a value of -1 is returned, and
is set to indicate the error.
If any of the following conditions occurs, the
to the value that corresponds to the condition.
parameter points outside the process' allocated address space.
The user does not have the correct permission to access the file.
The object pointed to by the
is not fattached to a
device or pipe.
was translated, too many symbolic links were found.
parameter points to a path name that does not exist.
The directory portion of the
parameter does not exist.
The size of a path name component is longer than
is in effect, or the path name length is longer
The current effective user ID is not the owner of the existing object
specified by the
the current effective user ID does not specify a
user with the correct permissions.