From owner-svn-src-all@FreeBSD.ORG Tue Dec 11 22:52:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83AD22F4; Tue, 11 Dec 2012 22:52:57 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 678848FC08; Tue, 11 Dec 2012 22:52:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBBMqvN9011179; Tue, 11 Dec 2012 22:52:57 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBBMqvH9011176; Tue, 11 Dec 2012 22:52:57 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201212112252.qBBMqvH9011176@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 11 Dec 2012 22:52:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244126 - head/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2012 22:52:57 -0000 Author: jilles Date: Tue Dec 11 22:52:56 2012 New Revision: 244126 URL: http://svnweb.freebsd.org/changeset/base/244126 Log: libc: Make various internal file descriptors close-on-exec. These are obtained via fopen(). Modified: head/lib/libc/locale/collate.c head/lib/libc/locale/setrunelocale.c Modified: head/lib/libc/locale/collate.c ============================================================================== --- head/lib/libc/locale/collate.c Tue Dec 11 20:38:53 2012 (r244125) +++ head/lib/libc/locale/collate.c Tue Dec 11 22:52:56 2012 (r244126) @@ -135,7 +135,7 @@ __collate_load_tables_l(const char *enco (void)strcat(buf, "/"); (void)strcat(buf, encoding); (void)strcat(buf, "/LC_COLLATE"); - if ((fp = fopen(buf, "r")) == NULL) + if ((fp = fopen(buf, "re")) == NULL) return (_LDP_ERROR); if (fread(strbuf, sizeof(strbuf), 1, fp) != 1) { Modified: head/lib/libc/locale/setrunelocale.c ============================================================================== --- head/lib/libc/locale/setrunelocale.c Tue Dec 11 20:38:53 2012 (r244125) +++ head/lib/libc/locale/setrunelocale.c Tue Dec 11 22:52:56 2012 (r244126) @@ -129,7 +129,7 @@ __setrunelocale(struct xlocale_ctype *l, (void) strcat(name, encoding); (void) strcat(name, "/LC_CTYPE"); - if ((fp = fopen(name, "r")) == NULL) + if ((fp = fopen(name, "re")) == NULL) return (errno == 0 ? ENOENT : errno); if ((rl = _Read_RuneMagi(fp)) == NULL) {