Subject: Re: [bug-diffutils] bug#31218: kill() not wrapped with HAVE_WORKING_FORK

From: Paul Eggert <[email-masked]>
Date: Fri, 20 Apr 2018 13:40:52 -0700

On 04/20/2018 06:29 AM, Burton, Ross wrote:
> Yep, this compiles on mingw:

Thanks for checking; I installed the attached. Closing the bug report.

From b1e1f6512f66000d36ca43433aba56e89f609609 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Fri, 20 Apr 2018 13:39:15 -0700
Subject: [PATCH] sdiff: port to mingw
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Problem reported by Ross Burton (Bug#31218).
* src/sdiff.c (checksigs): Use ‘raise’, not ‘kill’.
---
 src/sdiff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sdiff.c b/src/sdiff.c
index 1b23a0c..b08bc74 100644
--- a/src/sdiff.c
+++ b/src/sdiff.c
@@ -805,7 +805,7 @@ checksigs (void)
 
       /* Yield an exit status indicating that a signal was received.  */
       untrapsig (s);
-      kill (getpid (), s);
+      raise (s);
 
       /* That didn't work, so exit with error status.  */
       exit (EXIT_TROUBLE);
-- 
2.14.3