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

📄 pipe.2

📁 UNIX v6源代码 这几乎是最经典的unix版本 unix操作系统设计和莱昂氏unix源代码分析都是用的该版
💻 2
字号:
.th PIPE II 8/5/73.sh NAMEpipe \*- create an interprocess channel.sh SYNOPSIS(pipe = 42.).br.ft Bsys pipe.br.ft R(read file descriptor in r0).br(write file descriptor in r1).s3.ft Bpipe(fildes).brint fildes[2];.ft R.sh DESCRIPTIONThe.it pipesystem callcreates an I/O mechanism called a pipe.The file descriptors returned canbe used in read and write operations.When the pipe is written using the descriptorreturned in r1 (resp. fildes[1]),up to 4096 bytes of data are bufferedbefore the writing process is suspended.A read using the descriptor returned in r0(resp. fildes[0])will pick up the data..s3It is assumed that after thepipe has been set up,two (or more)cooperating processes(created by subsequent.it forkcalls)will pass data through thepipe with.it readand.it writecalls..s3The Shell has a syntaxto set up a linear array of processesconnected by pipes..s3Read calls on an emptypipe (no buffered data) with only one end(all write file descriptors closed)return an end-of-file.Write calls under similar conditions generatea fatal signal (signal (II)); if the signal is ignored,an error is returned on the write..sh "SEE ALSO"sh (I), read (II), write (II), fork (II).sh DIAGNOSTICSThe errorbit (c-bit) is set iftoo many files are already open.From C, a \*-1 returned valueindicates an error.A signal is generated if a write on a pipe with only one end is attempted..sh BUGS

⌨️ 快捷键说明

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