Deleted Added
full compact
fopen.3 (242460) fopen.3 (243731)
1.\" Copyright (c) 1990, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Chris Torek and the American National Standards Committee X3,
6.\" on Information Processing Systems.
7.\"
8.\" Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)fopen.3 8.1 (Berkeley) 6/4/93
1.\" Copyright (c) 1990, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Chris Torek and the American National Standards Committee X3,
6.\" on Information Processing Systems.
7.\"
8.\" Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)fopen.3 8.1 (Berkeley) 6/4/93
33.\" $FreeBSD: head/lib/libc/stdio/fopen.3 242460 2012-11-01 22:47:42Z jilles $
33.\" $FreeBSD: head/lib/libc/stdio/fopen.3 243731 2012-11-30 23:51:33Z jilles $
34.\"
34.\"
35.Dd October 17, 2011
35.Dd November 30, 2012
36.Dt FOPEN 3
37.Os
38.Sh NAME
39.Nm fopen ,
40.Nm fdopen ,
41.Nm freopen
42.Nd stream open functions
43.Sh LIBRARY

--- 48 unchanged lines hidden (view full) ---

92.Dq Li x
93following
94.Dq Li w
95or
96.Dq Li w+
97causes the
98.Fn fopen
99call to fail if the file already exists.
36.Dt FOPEN 3
37.Os
38.Sh NAME
39.Nm fopen ,
40.Nm fdopen ,
41.Nm freopen
42.Nd stream open functions
43.Sh LIBRARY

--- 48 unchanged lines hidden (view full) ---

92.Dq Li x
93following
94.Dq Li w
95or
96.Dq Li w+
97causes the
98.Fn fopen
99call to fail if the file already exists.
100An optional
101.Dq Li e
102following the above
103causes the
104.Fn fopen
105call to set the
106.Dv FD_CLOEXEC
107flag on the underlying file descriptor.
100.Pp
101The
102.Fa mode
103string can also include the letter
104.Dq Li b
105after either the
106.Dq Li +
107or the first letter.

--- 31 unchanged lines hidden (view full) ---

139.Fn fdopen
140function associates a stream with the existing file descriptor,
141.Fa fildes .
142The mode
143of the stream must be compatible with the mode of the file descriptor.
144The
145.Dq Li x
146mode option is ignored.
108.Pp
109The
110.Fa mode
111string can also include the letter
112.Dq Li b
113after either the
114.Dq Li +
115or the first letter.

--- 31 unchanged lines hidden (view full) ---

147.Fn fdopen
148function associates a stream with the existing file descriptor,
149.Fa fildes .
150The mode
151of the stream must be compatible with the mode of the file descriptor.
152The
153.Dq Li x
154mode option is ignored.
155If the
156.Dq Li e
157mode option is present, the
158.Dv FD_CLOEXEC
159flag is set, otherwise it remains unchanged.
147When the stream is closed via
148.Xr fclose 3 ,
149.Fa fildes
150is closed also.
151.Pp
152The
153.Fn freopen
154function

--- 117 unchanged lines hidden (view full) ---

272.Dq Li x
273mode option which conforms to
274.St -isoC-2011 .
275The
276.Fn fdopen
277function
278conforms to
279.St -p1003.1-88 .
160When the stream is closed via
161.Xr fclose 3 ,
162.Fa fildes
163is closed also.
164.Pp
165The
166.Fn freopen
167function

--- 117 unchanged lines hidden (view full) ---

285.Dq Li x
286mode option which conforms to
287.St -isoC-2011 .
288The
289.Fn fdopen
290function
291conforms to
292.St -p1003.1-88 .
293The
294.Dq Li e
295mode option does not conform to any standard
296but is also supported by glibc.