GNU bug report logs - #31218
kill() not wrapped with HAVE_WORKING_FORK

Previous Next

Package: diffutils;

Reported by: "Burton, Ross" <ross.burton <at> intel.com>

Date: Thu, 19 Apr 2018 15:11:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#31218: closed (kill() not wrapped with HAVE_WORKING_FORK)
Date: Fri, 20 Apr 2018 20:42:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 20 Apr 2018 13:40:52 -0700
with message-id <0ba022e1-227d-2f58-532f-4bbeacfee518 <at> cs.ucla.edu>
and subject line Re: [bug-diffutils] bug#31218: kill() not wrapped with HAVE_WORKING_FORK
has caused the debbugs.gnu.org bug report #31218,
regarding kill() not wrapped with HAVE_WORKING_FORK
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
31218: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31218
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "Burton, Ross" <ross.burton <at> intel.com>
To: bug-diffutils <at> gnu.org
Subject: kill() not wrapped with HAVE_WORKING_FORK
Date: Thu, 19 Apr 2018 10:59:44 +0100
Hi,

In sdiff.c the use of kill() is guarded in cleanup():

static void
cleanup (int signo __attribute__((unused)))
{
#if HAVE_WORKING_FORK
  if (0 < diffpid)
    kill (diffpid, SIGPIPE);
#endif
  if (tmpname)
    unlink (tmpname);
}

However, in checksigs() it isn't.  A simple fix to help build
diffutils under mingw (which doesn't have kill()) is:

+--- a/src/sdiff.c
++++ b/src/sdiff.c
+@@ -805,7 +805,9 @@
+
+       /* Yield an exit status indicating that a signal was received.  */
+       untrapsig (s);
++#if HAVE_WORKING_FORK
+       kill (getpid (), s);
++#endif
+
+       /* That didn't work, so exit with error status.  */
+       exit (EXIT_TROUBLE);

Cheers,
Ross


[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: "Burton, Ross" <ross.burton <at> intel.com>
Cc: 31218-done <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#31218: kill() not wrapped with
 HAVE_WORKING_FORK
Date: Fri, 20 Apr 2018 13:40:52 -0700
[Message part 4 (text/plain, inline)]
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.

[0001-sdiff-port-to-mingw.txt (text/plain, attachment)]

This bug report was last modified 7 years and 95 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.