This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.13-103-g1bfbe0d
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 3 May 2011 01:37:20 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.13-103-g1bfbe0d
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 1bfbe0d335d3fc44a492648b974a0db19975f6d8 (commit)
from 0b592a30f5e3133bde98551fd524085359c3177a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1bfbe0d335d3fc44a492648b974a0db19975f6d8
commit 1bfbe0d335d3fc44a492648b974a0db19975f6d8
Author: Ulrich Drepper <drepper@gmail.com>
Date: Mon May 2 21:34:34 2011 -0400
Better use of open in pathconf.
diff --git a/sysdeps/unix/sysv/linux/pathconf.c b/sysdeps/unix/sysv/linux/pathconf.c
index 375d672..52610a1 100644
--- a/sysdeps/unix/sysv/linux/pathconf.c
+++ b/sysdeps/unix/sysv/linux/pathconf.c
@@ -37,6 +37,7 @@ __pathconf (const char *file, int name)
{
struct statfs fsbuf;
int fd;
+ int flags;
switch (name)
{
@@ -53,7 +54,11 @@ __pathconf (const char *file, int name)
return __statfs_chown_restricted (__statfs (file, &fsbuf), &fsbuf);
case _PC_PIPE_BUF:
- fd = open_not_cancel_2 (file, O_RDONLY|O_NONBLOCK);
+ flags = O_RDONLY|O_NONBLOCK|O_NOCTTY;
+#ifdef O_CLOEXEC
+ flags |= O_CLOEXEC;
+#endif
+ fd = open_not_cancel_2 (file, flags);
if (fd >= 0)
{
long int r = __fcntl (fd, F_GETPIPE_SZ);
-----------------------------------------------------------------------
Summary of changes:
sysdeps/unix/sysv/linux/pathconf.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU C Library master sources