Mercurial > hg > octave-nkf > gnulib-hg
changeset 10210:9f848a3cc15a
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.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Mon, 16 Jun 2008 16:45:09 -0600 |
parents | 459a0f456fc4 |
children | 3453d244d097 |
files | ChangeLog lib/fatal-signal.c lib/sigprocmask.c m4/fatal-signal.m4 m4/signalblocking.m4 modules/fatal-signal modules/sigprocmask |
diffstat | 7 files changed, 16 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- a/lib/fatal-signal.c +++ b/lib/fatal-signal.c @@ -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 @@ 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 }
--- a/lib/sigprocmask.c +++ b/lib/sigprocmask.c @@ -179,13 +179,7 @@ for (sig = 0; sig < NSIG; sig++) if (received[sig]) - { - #if HAVE_RAISE - raise (sig); - #else - kill (getpid (), sig); - #endif - } + raise (sig); } } return 0;
--- a/m4/fatal-signal.m4 +++ b/m4/fatal-signal.m4 @@ -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_REQUIRE([gt_TYPE_SIG_ATOMIC_T]) AC_CHECK_HEADERS_ONCE(unistd.h) - AC_CHECK_FUNCS_ONCE(raise) AC_CHECK_FUNCS(sigaction) ])
--- a/m4/signalblocking.m4 +++ b/m4/signalblocking.m4 @@ -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 @@ 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) ])