⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fdetach.3

📁 7号信令功能代码,为开源代码
💻 3
字号:
'\" rtp.\" -*- nroff -*-.\".\" @(#) fdetach.3,v 1.1.1.2.8.1 2004/01/12 23:32:49 brian Exp.\".\" =========================================================================.\".\" Copyright (C) 2001-2004  OpenSS7 Corporation <www.openss7.com>.\".\" All Rights Reserved..\".\" Permission is granted to make and distribute verbatim copies of this.\" manual provided the copyright notice and this permission notice are.\" preserved on all copies..\".\" Permission is granted to copy and distribute modified versions of this.\" manual under the conditions for verbatim copying, provided that the.\" entire resulting derived work is distributed under the terms of a.\" permission notice identical to this one.\" .\" Since the Linux kernel and libraries are constantly changing, this.\" manual page may be incorrect or out-of-date.  The author(s) assume no.\" responsibility for errors or omissions, or for damages resulting from.\" the use of the information contained herein.  The author(s) may not.\" have taken the same level of care in the production of this manual,.\" which is licensed free of charge, as they might when working.\" professionally..\" .\" Formatted or processed versions of this manual, if unaccompanied by.\" the source, must acknowledge the copyright and authors of this work..\".\" -------------------------------------------------------------------------.\".\" U.S. GOVERNMENT RESTRICTED RIGHTS.  If you are licensing this Software.\" on behalf of the U.S. Government ("Government"), the following.\" provisions apply to you.  If the Software is supplied by the Department.\" of Defense ("DoD"), it is classified as "Commercial Computer Software".\" under paragraph 252.227-7014 of the DoD Supplement to the Federal.\" Acquisition Regulations ("DFARS") (or any successor regulations) and the.\" Government is acquiring only the license rights granted herein (the.\" license rights customarily provided to non-Government users).  If the.\" Software is supplied to any unit or agency of the Government other than.\" DoD, it is classified as "Restricted Computer Software" and the.\" Government's rights in the Software are defined in paragraph 52.227-19.\" of the Federal Acquisition Regulations ("FAR") (or any success.\" regulations) or, in the cases of NASA, in paragraph 18.52.227-86 of the.\" NASA Supplement to the FAR (or any successor regulations)..\".\" =========================================================================.\".\" Modified 2004/01/12 23:32:49 by brian.\".\" =========================================================================.\".\" Copyright (C) 2000  John A. Boyd Jr.  protologos, LLC.\".\" This library is free software; you can redistribute it and/or.\" modify it under the terms of the GNU Library General Public.\" License as published by the Free Software Foundation; either.\" version 2 of the License, or (at your option) any later version..\".\" This library is distributed in the hope that it will be useful,.\" but WITHOUT ANY WARRANTY; without even the implied warranty of.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU.\" Library General Public License for more details..\".\" You should have received a copy of the GNU Library General Public.\" License along with this library; if not, write to the.\" Free Software Foundation, Inc., 59 Temple Place - Suite 330, Cambridge,.\" MA 02139, USA..\".so lis.macros.R1bracket-label "\fR[\fB" "\fR]" "\fR, \fB"no-default-databasedatabase lis.refsaccumulatemove-punctuationabbreviate Ajoin-authors ", " ", " " and "et-al " et al" 2 3abbreviate-label-ranges ".."sort-adjacent-labels.R2.\".\".TH FDETACH 3 "2004/01/12 23:32:49" "LiS-2_16_18-8" "Linux STREAMS".SH NAME.B fdetach\- detach any \fISTREAMS\fR file from a path name in the file system.SH SYNOPSIS.PP.B "#include <stropts.h> ".HP.BI "int fdetach( const char *" path " ); ".SH DESCRIPTION.PP.BR fdetach "() "detaches an open.I STREAMSfile from a path name in the file system..BR fdetach "() "will also.BR close "(2) "the.I STREAMSfile if it represents the last.BR open "(2) "of that file..SH "RETURN VALUE".PPUpon successful completion,.BR fdetach "() "returns 0.  Upon failure,.B fattachreturn -1, and.BR errno "(3) "is set to indicate the error causing the failure (see below)..SH ERRORS.PP.BR fdetach "() "may fail with at least the following error indications:.TP 12.B "[EINVAL]"No.I STREAMSfile is currently attached to the.I pathgiven as an argument..SH "APPLICATION USAGE".PPApplications wishing to use the version of the.BR fdetach "() "function described herein must link with the.B LiS.[LiS.]library whichprovides it.  TheLinux/GNU C library otherwise provides a stub supporting calls to.BR fdetach "() "which only generates an error indicating that it is not implemented..SH WARNINGS.PPThe effect of calling.BR fdetach "() "on an attached.I STREAMSfile occurs automatically when a.I hangupindication is received, unless passed file descriptors (in the form of.B M_PASSFPmessages) are pending receipt via the.B I_RECVFD.I ioctl.This will occur normally in two situations: when the file is apipe end and the other end is closed for the last time and released;and when a driver sends an.B M_HANGUPmessage upward to the stream head.In this state, the.I STREAMSfile becomes unusable for normal message traffic, andthe automatic detachment ensures that it will be closed and itsresources released.It should be noted, however, that this behavior is not common toother.ISTREAMSimplementations and should be considered a non-standard extension..SH "FUTURE DIRECTIONS".PP.BR fdetach "() "is currently implemented as an IOCTL operation on an anonymous.I STREAMSfile.Should.B LiS.[LiS.]ever become part of the Linux kernel, it may become asystem call; a system call implementation is in fact alreadyincluded within.B LiS\c..[LiS.].SH "SEE ALSO".PP.BR fattach "(3), ".BR fattach "(8), ".BR fdetach "(8), ".BR STREAMS "(4) ".SH HISTORY.PPUNIX\(rg\ System V Release 4 (SVR4).[svr4.].SH AUTHOR.PPJohn Boyd, protologos LLC..[$LIST$.].TI

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -