Use raise module consistently.
authorEric Blake <ebb9@byu.net>
Mon, 16 Jun 2008 22:45:09 +0000 (16:45 -0600)
committerEric Blake <ebb9@byu.net>
Mon, 16 Jun 2008 22:45:09 +0000 (16:45 -0600)
* modules/fatal-signal (Depends-on): Add raise.
* modules/sigprocmask (Depends-on): Likewise.
* lib/fatal-signal.c (fatal_signal_handler): Rely on raise.
* lib/sigprocmask.c (sigprocmask): Likewise.
* m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Likewise.
* m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/fatal-signal.c
lib/sigprocmask.c
m4/fatal-signal.m4
m4/signalblocking.m4
modules/fatal-signal
modules/sigprocmask

index 054cec0..0976ec3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2008-06-16  Eric Blake  <ebb9@byu.net>
 
+       Use raise module consistently.
+       * modules/fatal-signal (Depends-on): Add raise.
+       * modules/sigprocmask (Depends-on): Likewise.
+       * lib/fatal-signal.c (fatal_signal_handler): Rely on raise.
+       * lib/sigprocmask.c (sigprocmask): Likewise.
+       * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Likewise.
+       * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Likewise.
+
        Fix compliance bug in sigpending.
        * lib/sigprocmask.c (sigpending): Return pending array via
        parameter, not return value.
index 5157d7c..a599f3a 100644 (file)
@@ -1,5 +1,5 @@
 /* Emergency actions in case of a fatal signal.
-   Copyright (C) 2003-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2003-2004, 2006-2008 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
@@ -162,11 +162,7 @@ fatal_signal_handler (int sig)
      signal handler's execution, the re-raised signal is delivered when this
      handler returns; otherwise it is delivered already during raise().  */
   uninstall_handlers ();
-#if HAVE_RAISE
   raise (sig);
-#else
-  kill (getpid (), sig);
-#endif
 }
 
 
index e2f6d8b..bc9eae7 100644 (file)
@@ -179,13 +179,7 @@ sigprocmask (int operation, const sigset_t *set, sigset_t *old_set)
 
          for (sig = 0; sig < NSIG; sig++)
            if (received[sig])
-             {
-               #if HAVE_RAISE
-               raise (sig);
-               #else
-               kill (getpid (), sig);
-               #endif
-             }
+              raise (sig);
        }
     }
   return 0;
index c188b14..1930e0a 100644 (file)
@@ -1,5 +1,5 @@
-# fatal-signal.m4 serial 4
-dnl Copyright (C) 2003-2004, 2006 Free Software Foundation, Inc.
+# fatal-signal.m4 serial 5
+dnl Copyright (C) 2003-2004, 2006, 2008 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,6 +8,5 @@ AC_DEFUN([gl_FATAL_SIGNAL],
 [
   AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
   AC_CHECK_HEADERS_ONCE(unistd.h)
-  AC_CHECK_FUNCS_ONCE(raise)
   AC_CHECK_FUNCS(sigaction)
 ])
index 199f29b..38f066d 100644 (file)
@@ -1,5 +1,5 @@
-# signalblocking.m4 serial 6
-dnl Copyright (C) 2001-2002, 2006-2007 Free Software Foundation, Inc.
+# signalblocking.m4 serial 7
+dnl Copyright (C) 2001-2002, 2006-2008 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -39,5 +39,4 @@ AC_DEFUN([gl_PREREQ_SIGPROCMASK],
   dnl HAVE_SIGSET_T is 1 if the system lacks the sigprocmask function but has
   dnl the sigset_t type.
   AC_SUBST([HAVE_SIGSET_T])
-  AC_CHECK_FUNCS_ONCE(raise)
 ])
index 4365b3a..8e8eb8a 100644 (file)
@@ -12,6 +12,7 @@ xalloc
 stdbool
 unistd
 sigprocmask
+raise
 
 configure.ac:
 gl_FATAL_SIGNAL
index 49e4fbb..e093112 100644 (file)
@@ -8,6 +8,7 @@ m4/signalblocking.m4
 Depends-on:
 signal
 stdint
+raise
 
 configure.ac:
 gl_SIGNALBLOCKING