svn commit: r482901 - in head/devel/leatherman: . files
Romain Tartière
romain at FreeBSD.org
Wed Oct 24 14:01:10 UTC 2018
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 at 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 at 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<char* const*>(argv), const_cast<char* const*>(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);
}
More information about the svn-ports-all
mailing list