From owner-svn-ports-head@freebsd.org Wed Oct 24 14:01:10 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17DA4FE9568; Wed, 24 Oct 2018 14:01:10 +0000 (UTC) (envelope-from romain@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CAB59157C; Wed, 24 Oct 2018 14:01:09 +0000 (UTC) (envelope-from romain@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 171BB26B31; Wed, 24 Oct 2018 11:31:42 +0000 (UTC) (envelope-from romain@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9OBVfU4012010; Wed, 24 Oct 2018 11:31:41 GMT (envelope-from romain@FreeBSD.org) Received: (from romain@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9OBVfvu012007; Wed, 24 Oct 2018 11:31:41 GMT (envelope-from romain@FreeBSD.org) Message-Id: <201810241131.w9OBVfvu012007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: romain set sender to romain@FreeBSD.org using -f From: =?UTF-8?Q?Romain_Tarti=c3=a8re?= Date: Wed, 24 Oct 2018 11:31:41 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r482901 - in head/devel/leatherman: . files X-SVN-Group: ports-head X-SVN-Commit-Author: romain X-SVN-Commit-Paths: in head/devel/leatherman: . files X-SVN-Commit-Revision: 482901 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 14:01:10 -0000 Author: romain Date: Wed Oct 24 11:31:40 2018 New Revision: 482901 URL: https://svnweb.freebsd.org/changeset/ports/482901 Log: Fix closure of open file descriptors Rely on closefrom(2) instead of a loop on close(2) to close all opened file descriptors. This greatly improve performances. While here, commit changes to patches generated by make makepatch. With hat: puppet PR: 232538 Reported by: vmiller@verisign.com Added: head/devel/leatherman/files/patch-execution_src_posix_execution.cc (contents, props changed) Modified: head/devel/leatherman/Makefile head/devel/leatherman/files/patch-json__container_tests_json__container__test.cc head/devel/leatherman/files/patch-locale_src_locale.cc Modified: head/devel/leatherman/Makefile ============================================================================== --- head/devel/leatherman/Makefile Wed Oct 24 10:50:16 2018 (r482900) +++ head/devel/leatherman/Makefile Wed Oct 24 11:31:40 2018 (r482901) @@ -2,6 +2,7 @@ PORTNAME= leatherman PORTVERSION= 1.5.1 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= puppet@FreeBSD.org Added: head/devel/leatherman/files/patch-execution_src_posix_execution.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/leatherman/files/patch-execution_src_posix_execution.cc Wed Oct 24 11:31:40 2018 (r482901) @@ -0,0 +1,13 @@ +--- execution/src/posix/execution.cc.orig 2018-09-29 16:21:31 UTC ++++ execution/src/posix/execution.cc +@@ -314,9 +314,7 @@ namespace leatherman { namespace executi + } + + // Close all open file descriptors above stderr +- for (uint64_t i = (STDERR_FILENO + 1); i < max_fd; ++i) { +- close(i); +- } ++ closefrom(STDERR_FILENO + 1); + + // Execute the given program; this should not return if successful + execve(program, const_cast(argv), const_cast(envp)); Modified: head/devel/leatherman/files/patch-json__container_tests_json__container__test.cc ============================================================================== --- head/devel/leatherman/files/patch-json__container_tests_json__container__test.cc Wed Oct 24 10:50:16 2018 (r482900) +++ head/devel/leatherman/files/patch-json__container_tests_json__container__test.cc Wed Oct 24 11:31:40 2018 (r482901) @@ -1,6 +1,6 @@ ---- json_container/tests/json_container_test.cc.orig +--- json_container/tests/json_container_test.cc.orig 2018-09-29 16:21:31 UTC +++ json_container/tests/json_container_test.cc -@@ -22,11 +22,13 @@ +@@ -22,11 +22,13 @@ TEST_CASE("JsonContainer::JsonContainer std::string json_value {}; SECTION("it should instantiate by passing any JSON value") { Modified: head/devel/leatherman/files/patch-locale_src_locale.cc ============================================================================== --- head/devel/leatherman/files/patch-locale_src_locale.cc Wed Oct 24 10:50:16 2018 (r482900) +++ head/devel/leatherman/files/patch-locale_src_locale.cc Wed Oct 24 11:31:40 2018 (r482901) @@ -1,6 +1,6 @@ ---- locale/src/locale.cc.orig 2017-10-10 10:16:35 UTC +--- locale/src/locale.cc.orig 2018-09-29 16:21:31 UTC +++ locale/src/locale.cc -@@ -43,6 +43,9 @@ namespace leatherman { namespace locale +@@ -44,6 +44,9 @@ namespace leatherman { namespace locale gen.add_messages_domain(domain); }