aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-11-15 04:24:42 -0500
committerUlrich Drepper <drepper@gmail.com>2011-11-15 04:24:42 -0500
commit312be3f9f5eab1643d7dcc7728c76d413d4f2640 (patch)
tree445eab9ef93914585b6625aa6ca93c24715771b7 /nptl
parent82af0fa8de8201803ac670fa0de7d702ce9f0f18 (diff)
downloadglibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.zip
glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.tar.gz
glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.tar.bz2
Clean up internal fopen uses
No need to ever not use c and e.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/pthread_getattr_np.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 1c084f7..9abaa26 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-15 Ulrich Drepper <drepper@gmail.com>
+
+ * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
+ /proc/self/maps.
+
2011-10-29 Ulrich Drepper <drepper@gmail.com>
[BZ #13358]
diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c
index 9c25caf..f03c978 100644
--- a/nptl/pthread_getattr_np.c
+++ b/nptl/pthread_getattr_np.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004, 2006, 2007, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -75,7 +75,7 @@ pthread_getattr_np (thread_id, attr)
/* The safest way to get the top of the stack is to read
/proc/self/maps and locate the line into which
__libc_stack_end falls. */
- FILE *fp = fopen ("/proc/self/maps", "rc");
+ FILE *fp = fopen ("/proc/self/maps", "rce");
if (fp == NULL)
ret = errno;
/* We need the limit of the stack in any case. */
@@ -164,7 +164,7 @@ pthread_getattr_np (thread_id, attr)
{
free (cpuset);
if (ret == ENOSYS)
- {
+ {
/* There is no such functionality. */
ret = 0;
iattr->cpuset = NULL;