This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug manual/10254] New: Description of 'fopen()' flags in manual/stdio.texi is incomplete
- From: "guido at trentalancia dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 8 Jun 2009 21:30:57 -0000
- Subject: [Bug manual/10254] New: Description of 'fopen()' flags in manual/stdio.texi is incomplete
- Reply-to: sourceware-bugzilla at sourceware dot org
The description of fopen() in manual/stdio.texi does not mention about three new
flags that have been introduced (in version 2.3, 2.3.3 and 2.7 respectively).
Such three flags ("m", "c" and "e") are however documented in the fopen manpage.
Proposed patch for manual/stdio.texi is attached here.
*** glibc-2.10.1/manual/stdio.texi.orig 2009-06-08 22:29:44.000000000 +0200
--- glibc-2.10.1/manual/stdio.texi 2009-06-08 23:13:48.000000000 +0200
***************
*** 198,205 ****
call. Always put the mode (@samp{r}, @samp{w+}, etc.) first; that is
the only part you are guaranteed will be understood by all systems.
! The GNU C library defines one additional character for use in
! @var{opentype}: the character @samp{x} insists on creating a new
file---if a file @var{filename} already exists, @code{fopen} fails
rather than opening it. If you use @samp{x} you are guaranteed that
you will not clobber an existing file. This is equivalent to the
--- 198,204 ----
call. Always put the mode (@samp{r}, @samp{w+}, etc.) first; that is
the only part you are guaranteed will be understood by all systems.
! The character @samp{x} in @var{opentype} insists on creating a new
file---if a file @var{filename} already exists, @code{fopen} fails
rather than opening it. If you use @samp{x} you are guaranteed that
you will not clobber an existing file. This is equivalent to the
***************
*** 212,217 ****
--- 211,230 ----
@samp{+} and @samp{b} are specified, they can appear in either order.
@xref{Binary Streams}.
+ The character @samp{m} (introduced in version 2.3) means that access
+ to the file should be attempted using @code{mmap}, rather than I/O
+ system calls. Currently, use of @code{mmap} is only attempted for a
+ file opened for reading.
+
+ Starting from version 2.3.3, the character @samp{c} in @var{opentype}
+ can be used to prevent the creation of thread cancellation points for
+ the open operation and any subsequent read or write operations.
+
+ Since version 2.7 of the GNU C library, the character @samp{e} can be
+ used in @var{opentype} to open the file with the O_CLOEXEC flag of
+ @code{open} (enables the close-on-exec flag which indicates whether
+ or not the file descriptor should remain open across exec-calls).
+
@cindex stream orientation
@cindex orientation, stream
If the @var{opentype} string contains the sequence
--
Summary: Description of 'fopen()' flags in manual/stdio.texi is
incomplete
Product: glibc
Version: 2.10
Status: NEW
Severity: normal
Priority: P2
Component: manual
AssignedTo: roland at gnu dot org
ReportedBy: guido at trentalancia dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10254
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.