* 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>
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.
/* 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
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
}
for (sig = 0; sig < NSIG; sig++)
if (received[sig])
- {
- #if HAVE_RAISE
- raise (sig);
- #else
- kill (getpid (), sig);
- #endif
- }
+ raise (sig);
}
}
return 0;
-# 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.
[
AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
AC_CHECK_HEADERS_ONCE(unistd.h)
- AC_CHECK_FUNCS_ONCE(raise)
AC_CHECK_FUNCS(sigaction)
])
-# 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.
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)
])
stdbool
unistd
sigprocmask
+raise
configure.ac:
gl_FATAL_SIGNAL
Depends-on:
signal
stdint
+raise
configure.ac:
gl_SIGNALBLOCKING