svn commit: r512035 - in head/devel/leatherman: . files

Romain Tartière romain at FreeBSD.org
Sat Sep 14 16:29:23 UTC 2019


Author: romain
Date: Sat Sep 14 16:29:22 2019
New Revision: 512035
URL: https://svnweb.freebsd.org/changeset/ports/512035

Log:
  Fix execution interupted by signal detection
  
  With the default version of Ruby changing to 2.6, sysutils/facter fails to
  gather some facts due to leatherman not handling signals properly.
  
  With hat:	puppet
  PR:		240566
  Submitted by:	allanjude
  Reported by:	albert.shih at obspm.fr

Added:
  head/devel/leatherman/files/patch-execution_src_posix_execution.cc   (contents, props changed)
Modified:
  head/devel/leatherman/Makefile

Modified: head/devel/leatherman/Makefile
==============================================================================
--- head/devel/leatherman/Makefile	Sat Sep 14 16:20:52 2019	(r512034)
+++ head/devel/leatherman/Makefile	Sat Sep 14 16:29:22 2019	(r512035)
@@ -2,6 +2,7 @@
 
 PORTNAME=	leatherman
 PORTVERSION=	1.7.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	Sat Sep 14 16:29:22 2019	(r512035)
@@ -0,0 +1,20 @@
+--- execution/src/posix/execution.cc.orig	2019-08-10 21:37:06 UTC
++++ execution/src/posix/execution.cc
+@@ -487,9 +487,14 @@ namespace leatherman { namespace execution {
+                 kill(-child, SIGKILL);
+             }
+             // Wait for the child to exit
+-            if (waitpid(child, &status, 0) == -1) {
+-                LOG_DEBUG(format_error(_("waitpid failed")));
+-                return;
++            while (waitpid(child, &status, 0) == -1) {
++                if ( errno == EINTR ) {
++                    LOG_DEBUG(format_error(_("waitpid was interrupted by a signal, retrying")));
++                    continue;
++                } else {
++                    LOG_DEBUG(format_error(_("waitpid failed")));
++                    return;
++                }
+             }
+             if (WIFEXITED(status)) {
+                 status = static_cast<char>(WEXITSTATUS(status));


More information about the svn-ports-all mailing list