aboutsummaryrefslogtreecommitdiff
path: root/libio/libio.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-05-15 15:28:46 -0400
committerUlrich Drepper <drepper@gmail.com>2011-05-15 15:28:46 -0400
commit94b7cc3711b0b74c1d3ae18b9a2e019e51a8e0bf (patch)
tree2ddc8ca200024ecca3faf0f2efffaea15e21a04f /libio/libio.h
parentbd25564e1e98910ed69043ed6a6f884ce60e5780 (diff)
downloadglibc-94b7cc3711b0b74c1d3ae18b9a2e019e51a8e0bf.zip
glibc-94b7cc3711b0b74c1d3ae18b9a2e019e51a8e0bf.tar.gz
glibc-94b7cc3711b0b74c1d3ae18b9a2e019e51a8e0bf.tar.bz2
Fix a few problems in fopen and freopen
fopen should set the FD_CLOEXEC flag if requested evenif the kernel does not support an aotmic operation. freopen should reuse the file descriptor for the stream. This is especially important for calls to change the standard streams (stin, stdout, stderr).
Diffstat (limited to 'libio/libio.h')
-rw-r--r--libio/libio.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libio/libio.h b/libio/libio.h
index 3c9f2bd..bebc112 100644
--- a/libio/libio.h
+++ b/libio/libio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1995,1997-2006,2007,2009 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1995,1997-2006,2007,2009,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Per Bothner <bothner@cygnus.com>.
@@ -145,6 +145,8 @@
#define _IO_FLAGS2_USER_WBUF 8
#ifdef _LIBC
# define _IO_FLAGS2_SCANF_STD 16
+# define _IO_FLAGS2_NOCLOSE 32
+# define _IO_FLAGS2_CLOEXEC 64
#endif
/* These are "formatting flags" matching the iostream fmtflags enum values. */