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:
Yusuke Endoh 2019-10-09 22:57:19 +09:00
Родитель 6f11c3b335
Коммит b9cf58d2b2
1 изменённых файлов: 17 добавлений и 18 удалений

Просмотреть файл

@ -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)
{