summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-07-22 18:37:10 +0000
committerUlrich Drepper <drepper@redhat.com>2007-07-22 18:37:10 +0000
commit65d834b0add966dbbdb5ed1e916c60b2b2d87f10 (patch)
treef43dddc5145ba38091bb23aa5b0240ebfbdd54f0 /libio
parent5c3d7832b66382c7d9046da600ef87e568ecb69f (diff)
downloadglibc-65d834b0add966dbbdb5ed1e916c60b2b2d87f10.tar.gz
glibc-65d834b0add966dbbdb5ed1e916c60b2b2d87f10.tar.xz
glibc-65d834b0add966dbbdb5ed1e916c60b2b2d87f10.zip
(_IO_new_file_fopen): Recognize 'e' flag and set O_CLOEXEC is needed.
Diffstat (limited to 'libio')
-rw-r--r--libio/fileops.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libio/fileops.c b/libio/fileops.c
index 886b3729c3..95cd2d64c9 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -320,6 +320,11 @@ _IO_new_file_fopen (fp, filename, mode, is32not64)
 	case 'c':
 	  fp->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 	  break;
+#ifdef O_CLOEXEC
+	case 'e':
+	  oflags |= O_CLOEXEC;
+	  break;
+#endif
 	default:
 	  /* Ignore.  */
 	  continue;