| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: pipe.2,v 1.29 2013/04/23 23:39:13 elric Exp $ | | 1 | .\" $NetBSD: pipe.2,v 1.30 2014/02/22 17:26:41 dholland Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 1980, 1991, 1993 | | 3 | .\" Copyright (c) 1980, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | | 4 | .\" The Regents of the University of California. All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" Redistribution and use in source and binary forms, with or without | | 6 | .\" Redistribution and use in source and binary forms, with or without |
7 | .\" modification, are permitted provided that the following conditions | | 7 | .\" modification, are permitted provided that the following conditions |
8 | .\" are met: | | 8 | .\" are met: |
9 | .\" 1. Redistributions of source code must retain the above copyright | | 9 | .\" 1. Redistributions of source code must retain the above copyright |
10 | .\" notice, this list of conditions and the following disclaimer. | | 10 | .\" notice, this list of conditions and the following disclaimer. |
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 11 | .\" 2. Redistributions in binary form must reproduce the above copyright |
12 | .\" notice, this list of conditions and the following disclaimer in the | | 12 | .\" notice, this list of conditions and the following disclaimer in the |
13 | .\" documentation and/or other materials provided with the distribution. | | 13 | .\" documentation and/or other materials provided with the distribution. |
14 | .\" 3. Neither the name of the University nor the names of its contributors | | 14 | .\" 3. Neither the name of the University nor the names of its contributors |
| @@ -31,26 +31,28 @@ | | | @@ -31,26 +31,28 @@ |
31 | .\" | | 31 | .\" |
32 | .Dd January 23, 2012 | | 32 | .Dd January 23, 2012 |
33 | .Dt PIPE 2 | | 33 | .Dt PIPE 2 |
34 | .Os | | 34 | .Os |
35 | .Sh NAME | | 35 | .Sh NAME |
36 | .Nm pipe | | 36 | .Nm pipe |
37 | .Nd create descriptor pair for interprocess communication | | 37 | .Nd create descriptor pair for interprocess communication |
38 | .Sh LIBRARY | | 38 | .Sh LIBRARY |
39 | .Lb libc | | 39 | .Lb libc |
40 | .Sh SYNOPSIS | | 40 | .Sh SYNOPSIS |
41 | .In unistd.h | | 41 | .In unistd.h |
42 | .Ft int | | 42 | .Ft int |
43 | .Fn pipe "int fildes[2]" | | 43 | .Fn pipe "int fildes[2]" |
| | | 44 | .In unistd.h |
| | | 45 | .In fcntl.h |
44 | .Ft int | | 46 | .Ft int |
45 | .Fn pipe2 "int fildes[2]" "int flags" | | 47 | .Fn pipe2 "int fildes[2]" "int flags" |
46 | .Sh DESCRIPTION | | 48 | .Sh DESCRIPTION |
47 | The | | 49 | The |
48 | .Fn pipe | | 50 | .Fn pipe |
49 | function | | 51 | function |
50 | creates a | | 52 | creates a |
51 | .Em pipe , | | 53 | .Em pipe , |
52 | which is an object allowing | | 54 | which is an object allowing |
53 | unidirectional data flow, | | 55 | unidirectional data flow, |
54 | and allocates a pair of file descriptors. | | 56 | and allocates a pair of file descriptors. |
55 | The first descriptor connects to the | | 57 | The first descriptor connects to the |
56 | .Em read end | | 58 | .Em read end |
| @@ -124,31 +126,27 @@ The reliable detection of this error can | | | @@ -124,31 +126,27 @@ The reliable detection of this error can |
124 | detected, a signal may be delivered to the process, indicating an | | 126 | detected, a signal may be delivered to the process, indicating an |
125 | address violation. | | 127 | address violation. |
126 | .It Bq Er EMFILE | | 128 | .It Bq Er EMFILE |
127 | Too many descriptors are active. | | 129 | Too many descriptors are active. |
128 | .It Bq Er ENFILE | | 130 | .It Bq Er ENFILE |
129 | The system file table is full. | | 131 | The system file table is full. |
130 | .El | | 132 | .El |
131 | .Pp | | 133 | .Pp |
132 | .Fn pipe2 | | 134 | .Fn pipe2 |
133 | will also fail if: | | 135 | will also fail if: |
134 | .Bl -tag -width Er | | 136 | .Bl -tag -width Er |
135 | .It Bq Er EINVAL | | 137 | .It Bq Er EINVAL |
136 | .Fa flags | | 138 | .Fa flags |
137 | is other than | | 139 | contains an invalid value. |
138 | .Dv O_NONBLOCK , | | | |
139 | .Dv O_NOSIGPIPE | | | |
140 | or | | | |
141 | .Dv O_CLOEXEC . | | | |
142 | .El | | 140 | .El |
143 | .Sh SEE ALSO | | 141 | .Sh SEE ALSO |
144 | .Xr sh 1 , | | 142 | .Xr sh 1 , |
145 | .Xr fork 2 , | | 143 | .Xr fork 2 , |
146 | .Xr read 2 , | | 144 | .Xr read 2 , |
147 | .Xr socketpair 2 , | | 145 | .Xr socketpair 2 , |
148 | .Xr write 2 | | 146 | .Xr write 2 |
149 | .Sh STANDARDS | | 147 | .Sh STANDARDS |
150 | The | | 148 | The |
151 | .Fn pipe | | 149 | .Fn pipe |
152 | function conforms to | | 150 | function conforms to |
153 | .St -p1003.1-90 . | | 151 | .St -p1003.1-90 . |
154 | .Sh HISTORY | | 152 | .Sh HISTORY |