about summary refs log tree commit diff
path: root/manual/stdio.texi
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2012-04-09 21:06:55 +0200
committerAndreas Jaeger <aj@suse.de>2012-04-09 21:07:51 +0200
commit823fbbb41b4a7cbd45e5506d3f2d9381e9112405 (patch)
tree55d66009eab7e0dc04a904e238576f39520fc8f5 /manual/stdio.texi
parentc0ed9d7d2be861dc01cd6051415b8a8f1f5fa2aa (diff)
downloadglibc-823fbbb41b4a7cbd45e5506d3f2d9381e9112405.tar.gz
glibc-823fbbb41b4a7cbd45e5506d3f2d9381e9112405.tar.xz
glibc-823fbbb41b4a7cbd45e5506d3f2d9381e9112405.zip
Document additional fopen options
[BZ #10254]
The manual failed to explain the new (the first were introduced with
glibc 2.3 or so) parameters to fopen.
Diffstat (limited to 'manual/stdio.texi')
-rw-r--r--manual/stdio.texi32
1 files changed, 25 insertions, 7 deletions
diff --git a/manual/stdio.texi b/manual/stdio.texi
index 0d23daae2c..e870afb163 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -196,13 +196,31 @@ Additional characters may appear after these to specify flags for the
 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.
 
-@Theglibc{} 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
-@code{O_EXCL} option to the @code{open} function (@pxref{Opening and
-Closing Files}).
+@Theglibc{} defines additional characters for use in @var{opentype}:
+
+@table @samp
+@item c
+The file is opened with cancellation in the I/O functions disabled.
+
+@item e
+The underlying file descriptor will be closed if you use any of the
+@code{exec@dots{}} functions (@pxref{Executing a File}).  (This is
+equivalent to having set @code{FD_CLOEXEC} on that descriptor.
+@xref{Descriptor Flags}.)
+
+@item m
+The file is opened and accessed using @code{mmap}.  This is only
+supported with files opened for reading.
+
+@item x
+Insist 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 @code{O_EXCL} option to the
+@code{open} function (@pxref{Opening and Closing Files}).
+
+The @samp{x} modifier is part of @w{ISO C11}.
+@end table
 
 The character @samp{b} in @var{opentype} has a standard meaning; it
 requests a binary stream rather than a text stream.  But this makes no