Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Sep 2019 16:29:23 +0000 (UTC)
From:      =?UTF-8?Q?Romain_Tarti=c3=a8re?= <romain@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r512035 - in head/devel/leatherman: . files
Message-ID:  <201909141629.x8EGTN6U042621@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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@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));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909141629.x8EGTN6U042621>