bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] [PATCH 3/3] portability: use raise(2) instead of kill(2)


From: Peter Rosin
Subject: [bug-diffutils] [PATCH 3/3] portability: use raise(2) instead of kill(2)
Date: Fri, 10 Feb 2012 17:12:15 +0100

kill(2) is not available with MSVC.

* src/sdiff.c (checksigs): Replace kill (getpid (), ...) with the
equivalent raise(...).
* bootstrap.conf (gnulib_modules): Add the raise module.

Copyright-paperwork-exempt: Yes
---
 bootstrap.conf |    1 +
 src/sdiff.c    |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 9c27562..49bd532 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -60,6 +60,7 @@ pclose
 popen
 progname
 propername
+raise
 readdir
 readme-release
 regex
diff --git a/src/sdiff.c b/src/sdiff.c
index e1bb117..8db3303 100644
--- a/src/sdiff.c
+++ b/src/sdiff.c
@@ -814,7 +814,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);
-- 
1.7.5.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]