signal.c (ruby_abort): move the definition for refactoring
The three functions for fatal signals, sigbus, sigsegv, and sigill, are a family. The definition of ruby_abort had interrupted them for no reason. This change just moves the definition after the family.
This commit is contained in:
parent
6f11c3b335
commit
b9cf58d2b2
35
signal.c
35
signal.c
@ -937,24 +937,6 @@ sigbus(int sig SIGINFO_ARG)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __sun
|
||||
NORETURN(static void ruby_abort(void));
|
||||
#endif
|
||||
|
||||
static void
|
||||
ruby_abort(void)
|
||||
{
|
||||
#ifdef __sun
|
||||
/* Solaris's abort() is async signal unsafe. Of course, it is not
|
||||
* POSIX compliant.
|
||||
*/
|
||||
raise(SIGABRT);
|
||||
#else
|
||||
abort();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#ifdef SIGSEGV
|
||||
|
||||
NORETURN(static ruby_sigaction_t sigsegv);
|
||||
@ -983,6 +965,23 @@ sigill(int sig SIGINFO_ARG)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __sun
|
||||
NORETURN(static void ruby_abort(void));
|
||||
#endif
|
||||
|
||||
static void
|
||||
ruby_abort(void)
|
||||
{
|
||||
#ifdef __sun
|
||||
/* Solaris's abort() is async signal unsafe. Of course, it is not
|
||||
* POSIX compliant.
|
||||
*/
|
||||
raise(SIGABRT);
|
||||
#else
|
||||
abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
check_reserved_signal_(const char *name, size_t name_len)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user